@Kha It seems the recent parser modifications created some unexpected problems. I didn't investigate them. I am "lost" in the elaborator and dependent pattern matching land. 1) We can't write anymore ``` f [1, 2, 3] |>.run' 0 = Except.ok () ``` We have to use parentheses and the error message is weird :( ``` (f [1, 2, 3] |>.run' 0) = Except.ok () ``` 2) I had to add comments to `macro.lean`, I didn't find a workaround for one of the rules. BTW, I had to add a bunch of `:term` for fixing the other rules, and the error messages were counterintuitive.
17 lines
327 B
Text
17 lines
327 B
Text
def p (x : Nat := 0) : Nat × Nat :=
|
||
(x, x)
|
||
|
||
theorem ex1 : p.1 = 0 :=
|
||
rfl
|
||
|
||
theorem ex2 : (p (x := 1) |>.2) = 1 :=
|
||
rfl
|
||
|
||
def c {α : Type} [Inhabited α] : α × α :=
|
||
(arbitrary, arbitrary)
|
||
|
||
theorem ex3 {α} [Inhabited α] : c.1 = arbitrary (α := α) :=
|
||
rfl
|
||
|
||
theorem ex4 {α} [Inhabited α] : c.2 = arbitrary (α := α) :=
|
||
rfl
|