Agda User Manual v2.6.4.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 3.24 Lossy Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 of the datatype being matched on. • For each constructor c that does not appear in a clause, unification of the indices of the type of the constructor with the indices of the datatype should end in a the pattern x :: xs is Vec A (suc n), which is unifiable with the type Vec A (suc m). Meanwhile, unification of the type Vec A 0 of the constructor [] with the type Vec A (suc n) results in a conflict between0 码力 | 311 页 | 1.38 MB | 1 年前3
Agda User Manual v2.6.4.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 3.24 Lossy Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 of the datatype being matched on. • For each constructor c that does not appear in a clause, unification of the indices of the type of the constructor with the indices of the datatype should end in a the pattern x :: xs is Vec A (suc n), which is unifiable with the type Vec A (suc m). Meanwhile, unification of the type Vec A 0 of the constructor [] with the type Vec A (suc n) results in a conflict between0 码力 | 311 页 | 1.38 MB | 1 年前3
Agda User Manual v2.6.4.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 3.24 Lossy Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 of the datatype being matched on. • For each constructor c that does not appear in a clause, unification of the indices of the type of the constructor with the indices of the datatype should end in a the pattern x :: xs is Vec A (suc n), which is unifiable with the type Vec A (suc m). Meanwhile, unification of the type Vec A 0 of the constructor [] with the type Vec A (suc n) results in a conflict between0 码力 | 311 页 | 1.38 MB | 1 年前3
Agda User Manual v2.6.4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 3.24 Lossy Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 of the datatype being matched on. • For each constructor c that does not appear in a clause, unification of the indices of the type of the constructor with the indices of the datatype should end in a the pattern x :: xs is Vec A (suc n), which is unifiable with the type Vec A (suc m). Meanwhile, unification of the type Vec A 0 of the constructor [] with the type Vec A (suc n) results in a conflict between0 码力 | 313 页 | 1.38 MB | 1 年前3
Agda User Manual v2.6.3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 3.24 Lossy Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 of the datatype being matched on. • For each constructor c that does not appear in a clause, unification of the indices of the type of the constructor with the indices of the datatype should end in a the pattern x :: xs is Vec A (suc n), which is unifiable with the type Vec A (suc m). Meanwhile, unification of the type Vec A 0 of the constructor [] with the type Vec A (suc n) results in a conflict between0 码力 | 288 页 | 1.24 MB | 1 年前3
Agda User Manual v2.6.2.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 3.23 Lossy Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 of the datatype being matched on. • For each constructor c that does not appear in a clause, unification of the indices of the type of the constructor with the indices of the datatype should end in a pattern x :: xs is Vec A (suc n), which is unifiable with the type Vec A (suc m). Mean- while, unification of the type Vec A 0 of the constructor [] with the type Vec A (suc n) results in a conflict between0 码力 | 257 页 | 1.16 MB | 1 年前3
Programming in Lean
Release 3.4.2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.5 Metavariables and Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 6 Writing Automation processes. Lean employs a number of carefully chosen devices to support a clean and principled unification of the two worlds. Chief among these is the inclusion of a type Prop of propositions, or assertions expressions, instantiating metavariables if necessary. Note the use of the orelse notation: if the unification fails, the procedure backtracks and continues to try the remaining elements on the list. The fail0 码力 | 51 页 | 220.07 KB | 1 年前3
Agda User Manual v2.6.2of the datatype being matched on. • For each constructor c that does not appear in a clause, unification of the indices of the type of the constructor with the indices of the datatype should end in a pattern x :: xs is Vec A (suc n), which is unifiable with the type Vec A (suc m). Mean- while, unification of the type Vec A 0 of the constructor [] with the type Vec A (suc n) results in a conflict between combinations where one vector has length 0 and the other has length suc n. In the special case where unification ends in a conflict for all constructors, there should be a single absurd clase (as for an empty0 码力 | 255 页 | 1.13 MB | 1 年前3
Agda User Manual v2.6.2.1of the datatype being matched on. • For each constructor c that does not appear in a clause, unification of the indices of the type of the constructor with the indices of the datatype should end in a pattern x :: xs is Vec A (suc n), which is unifiable with the type Vec A (suc m). Mean- while, unification of the type Vec A 0 of the constructor [] with the type Vec A (suc n) results in a conflict between combinations where one vector has length 0 and the other has length suc n. In the special case where unification ends in a conflict for all constructors, there should be a single absurd clase (as for an empty0 码力 | 255 页 | 1.14 MB | 1 年前3
Agda User Manual v2.5.3where we guarantee that they are solved rules out many useful cases in practice. Metavariables Unification Instance Arguments • Usage – Defining type classes – Declaring instances – Examples 36 Chapter implicit arguments that get solved by a special instance resolution algorithm, rather than by the unification algorithm used for normal implicit arguments. In principle, an instance argument is resolved, if x, for any x : A. The argument x must be implicit, indicating that it needs to be inferred by unification whenever the B instance is used. See Instance resolution below for more details. Instance resolution0 码力 | 135 页 | 600.40 KB | 1 年前3
共 116 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12













