Agda User Manual v2.6.1.3can define the type Vec n of vectors of length n. This is a family of types indexed by objects in Nat (a type parameterized by natural numbers). Having dependent types, we must generalize the type of matrix, is then a function of type identity : (n : Nat) -> (Mat n n). Remark: We could, of course, just specify the identity function with the type Nat -> Nat -> Mat, where Mat is the type of matrices, but possible to define: equality on natural numbers properties of arithmetical operations the type (n : Nat) -> (PrimRoot n) consisting of functions computing primitive root in modular arithmetic. Of course0 码力 | 305 页 | 375.80 KB | 1 年前3
Agda User Manual v2.6.1.2can define the type Vec n of vectors of length n. This is a family of types indexed by objects in Nat (a type parameterized by natural numbers). Having dependent types, we must generalize the type of matrix, is then a function of type identity : (n : Nat) -> (Mat n n). Remark: We could, of course, just specify the identity function with the type Nat -> Nat -> Mat, where Mat is the type of matrices, but possible to define: equality on natural numbers properties of arithmetical operations the type (n : Nat) -> (PrimRoot n) consisting of functions computing primitive root in modular arithmetic. Of course0 码力 | 304 页 | 375.60 KB | 1 年前3
Agda User Manual v2.6.1.1can define the type Vec n of vectors of length n. This is a family of types indexed by objects in Nat (a type parameterized by natural numbers). Having dependent types, we must generalize the type of matrix, is then a function of type identity : (n : Nat) -> (Mat n n). Remark: We could, of course, just specify the identity function with the type Nat -> Nat -> Mat, where Mat is the type of matrices, but possible to define: equality on natural numbers properties of arithmetical operations the type (n : Nat) -> (PrimRoot n) consisting of functions computing primitive root in modular arithmetic. Of course0 码力 | 297 页 | 375.42 KB | 1 年前3
Agda User Manual v2.6.1can define the type Vec n of vectors of length n. This is a family of types indexed by objects in Nat (a type parameterized by natural numbers). Having dependent types, we must generalize the type of matrix, is then a function of type identity : (n : Nat) -> (Mat n n). Remark: We could, of course, just specify the identity function with the type Nat -> Nat -> Mat, where Mat is the type of matrices, but possible to define: equality on natural numbers properties of arithmetical operations the type (n : Nat) -> (PrimRoot n) consisting of functions computing primitive root in modular arithmetic. Of course0 码力 | 297 页 | 375.42 KB | 1 年前3
Agda User Manual v2.5.4.2various ways, e.g. as difference of two natural numbers: module Integer where abstract ℤ = Nat × Nat 0ℤ : ℤ 0ℤ = 0 , 0 1ℤ : ℤ 1ℤ = 1 , 0 _+ℤ_ : (x y : ℤ) → ℤ (p , n) +ℤ (p' , n') can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where x≡y : x ≡ 0 x≡y = refl Type signatures in where blocks are blocks of abstract definitions: module WherePrivate where abstract x : Nat x = proj₁ t where T = Nat × Nat t : T t = 0 , 1 p : proj₁ t ≡ 0 p = refl Note that if p0 码力 | 216 页 | 207.61 KB | 1 年前3
Agda User Manual v2.5.4in various ways, e.g. as difference of two natural numbers: module Integer where abstract = Nat × Nat 0 : 0 = 0 , 0 1 : 1 = 1 , 0 _+_ : (x y : ) → (p , n) + (p' , n') = (p + p') , (n + n') -_ : they can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where xy : x 0 xy = refl Type signatures in where blocks are private, so it is fine in where blocks of abstract definitions: module WherePrivate where abstract x : Nat x = proj1 t where T = Nat × Nat t : T t = 0 , 1 p : proj1 t 0 p = refl Note that if p was not private, application0 码力 | 155 页 | 668.67 KB | 1 年前3
Agda User Manual v2.5.4.1in various ways, e.g. as difference of two natural numbers: module Integer where abstract = Nat × Nat 0 : 0 = 0 , 0 1 : 1 = 1 , 0 _+_ : (x y : ) → (p , n) + (p' , n') = (p + p') , (n + n') -_ : they can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where xy : x 0 xy = refl Type signatures in where blocks are private, so it is fine in where blocks of abstract definitions: module WherePrivate where abstract x : Nat x = proj1 t where T = Nat × Nat t : T t = 0 , 1 p : proj1 t 0 p = refl Note that if p was not private, application0 码力 | 155 页 | 668.90 KB | 1 年前3
Agda User Manual v2.5.4.1various ways, e.g. as difference of two natural numbers: module Integer where abstract ℤ = Nat × Nat 0ℤ : ℤ 0ℤ = 0 , 0 1ℤ : ℤ 1ℤ = 1 , 0 _+ℤ_ : (x y : ℤ) → ℤ (p , n) +ℤ (p' , n') can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where x≡y : x ≡ 0 x≡y = refl Type signatures in where blocks are blocks of abstract definitions: module WherePrivate where abstract x : Nat x = proj₁ t where T = Nat × Nat t : T t = 0 , 1 p : proj₁ t ≡ 0 p = refl Note that if p0 码力 | 216 页 | 207.64 KB | 1 年前3
Agda User Manual v2.5.4.2in various ways, e.g. as difference of two natural numbers: module Integer where abstract = Nat × Nat 0 : 0 = 0 , 0 1 : 1 = 1 , 0 _+_ : (x y : ) → (p , n) + (p' , n') = (p + p') , (n + n') -_ : they can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where xy : x 0 xy = refl Type signatures in where blocks are private, so it is fine in where blocks of abstract definitions: module WherePrivate where abstract x : Nat x = proj1 t where T = Nat × Nat t : T t = 0 , 1 p : proj1 t 0 p = refl Note that if p was not private, application0 码力 | 155 页 | 668.75 KB | 1 年前3
Agda User Manual v2.5.4various ways, e.g. as difference of two natural numbers: module Integer where abstract ℤ = Nat × Nat 0ℤ : ℤ 0ℤ = 0 , 0 1ℤ : ℤ 1ℤ = 1 , 0 _+ℤ_ : (x y : ℤ) → ℤ (p , n) +ℤ (p' , n') can see through the abstractions of their uncles: module Where where abstract x : Nat x = 0 y : Nat y = x where x≡y : x ≡ 0 x≡y = refl Type signatures in where blocks are blocks of abstract definitions: module WherePrivate where abstract x : Nat x = proj₁ t where T = Nat × Nat t : T t = 0 , 1 p : proj₁ t ≡ 0 p = refl Note that if p0 码力 | 216 页 | 207.63 KB | 1 年前3
共 453 条
- 1
- 2
- 3
- 4
- 5
- 6
- 46













