Minimize use the colors in tests. The colors make the diff hard to read
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
598daa40bc
commit
a3bbd9fbb5
32 changed files with 138 additions and 106 deletions
|
@ -1,5 +1,6 @@
|
||||||
(* comment *)
|
(* comment *)
|
||||||
(* (* nested comment *) *)
|
(* (* nested comment *) *)
|
||||||
|
Set pp::colors false
|
||||||
Show true
|
Show true
|
||||||
Set lean::pp::notation false
|
Set lean::pp::notation false
|
||||||
Show true && false
|
Show true && false
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
|
Set option: pp::colors
|
||||||
⊤
|
⊤
|
||||||
Set option: lean::pp::notation
|
Set option: lean::pp::notation
|
||||||
and true false
|
and true false
|
||||||
Assumed: a
|
Assumed: a
|
||||||
Error (line: 7, pos: 0) invalid object declaration, environment already has an object named 'a'
|
Error (line: 8, pos: 0) invalid object declaration, environment already has an object named 'a'
|
||||||
Assumed: b
|
Assumed: b
|
||||||
and a b
|
and a b
|
||||||
Assumed: A
|
Assumed: A
|
||||||
Error (line: 11, pos: 11) type mismatch at application argument 2 of
|
Error (line: 12, pos: 11) type mismatch at application argument 2 of
|
||||||
and a A
|
and a A
|
||||||
expected type
|
expected type
|
||||||
Bool
|
Bool
|
||||||
given type
|
given type
|
||||||
[36mType[0m
|
Type
|
||||||
[34mVariable[0m A : [36mType[0m
|
Variable A : Type
|
||||||
⟨lean::pp::notation ↦ false⟩
|
⟨lean::pp::notation ↦ false, pp::colors ↦ false⟩
|
||||||
Error (line: 14, pos: 4) unknown option 'lean::p::notation', type 'Help Options.' for list of available options
|
Error (line: 15, pos: 4) unknown option 'lean::p::notation', type 'Help Options.' for list of available options
|
||||||
Error (line: 15, pos: 23) invalid option value, given option is not an integer
|
Error (line: 16, pos: 23) invalid option value, given option is not an integer
|
||||||
Set option: lean::pp::notation
|
Set option: lean::pp::notation
|
||||||
a ∧ b
|
a ∧ b
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
(* Define a "fake" type to simulate the natural numbers. This is just a test. *)
|
(* Define a "fake" type to simulate the natural numbers. This is just a test. *)
|
||||||
Variable N : Type
|
Variable N : Type
|
||||||
Variable lt : N -> N -> Bool
|
Variable lt : N -> N -> Bool
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set option: pp::colors
|
||||||
Assumed: N
|
Assumed: N
|
||||||
Assumed: lt
|
Assumed: lt
|
||||||
Assumed: zero
|
Assumed: zero
|
||||||
|
@ -10,38 +11,38 @@
|
||||||
Defined: update
|
Defined: update
|
||||||
Defined: select
|
Defined: select
|
||||||
Defined: map
|
Defined: map
|
||||||
[34mAxiom[0m two_lt_three : two < three
|
Axiom two_lt_three : two < three
|
||||||
[34mDefinition[0m vector (A : [36mType[0m) (n : N) : [36mType[0m [33m:=[0m [33mΠ[0m (i : N) (H : i < n), A
|
Definition vector (A : Type) (n : N) : Type := Π (i : N) (H : i < n), A
|
||||||
[34mDefinition[0m const {A : [36mType[0m} (n : N) (d : A) : vector A n [33m:=[0m [33mλ[0m (i : N) (H : i < n), d
|
Definition const {A : Type} (n : N) (d : A) : vector A n := λ (i : N) (H : i < n), d
|
||||||
[34mDefinition[0m const::explicit (A : [36mType[0m) (n : N) (d : A) : vector A n [33m:=[0m const n d
|
Definition const::explicit (A : Type) (n : N) (d : A) : vector A n := const n d
|
||||||
[34mDefinition[0m update {A : [36mType[0m} {n : N} (v : vector A n) (i : N) (d : A) : vector A n [33m:=[0m
|
Definition update {A : Type} {n : N} (v : vector A n) (i : N) (d : A) : vector A n :=
|
||||||
[33mλ[0m (j : N) (H : j < n), if A (j = i) d (v j H)
|
λ (j : N) (H : j < n), if A (j = i) d (v j H)
|
||||||
[34mDefinition[0m update::explicit (A : [36mType[0m) (n : N) (v : vector A n) (i : N) (d : A) : vector A n [33m:=[0m update v i d
|
Definition update::explicit (A : Type) (n : N) (v : vector A n) (i : N) (d : A) : vector A n := update v i d
|
||||||
[34mDefinition[0m select {A : [36mType[0m} {n : N} (v : vector A n) (i : N) (H : i < n) : A [33m:=[0m v i H
|
Definition select {A : Type} {n : N} (v : vector A n) (i : N) (H : i < n) : A := v i H
|
||||||
[34mDefinition[0m select::explicit (A : [36mType[0m) (n : N) (v : vector A n) (i : N) (H : i < n) : A [33m:=[0m select v i H
|
Definition select::explicit (A : Type) (n : N) (v : vector A n) (i : N) (H : i < n) : A := select v i H
|
||||||
[34mDefinition[0m map {A B C : [36mType[0m} {n : N} (f : A [33m→[0m B [33m→[0m C) (v1 : vector A n) (v2 : vector B n) : vector C n [33m:=[0m
|
Definition map {A B C : Type} {n : N} (f : A → B → C) (v1 : vector A n) (v2 : vector B n) : vector C n :=
|
||||||
[33mλ[0m (i : N) (H : i < n), f (v1 i H) (v2 i H)
|
λ (i : N) (H : i < n), f (v1 i H) (v2 i H)
|
||||||
[34mDefinition[0m map::explicit (A B C : [36mType[0m) (n : N) (f : A [33m→[0m B [33m→[0m C) (v1 : vector A n) (v2 : vector B n) : vector C n [33m:=[0m
|
Definition map::explicit (A B C : Type) (n : N) (f : A → B → C) (v1 : vector A n) (v2 : vector B n) : vector C n :=
|
||||||
map f v1 v2
|
map f v1 v2
|
||||||
Bool
|
Bool
|
||||||
⊤
|
⊤
|
||||||
vector Bool three
|
vector Bool three
|
||||||
|
|
||||||
--------
|
--------
|
||||||
[33mΠ[0m (A : [36mType[0m) (n : N) (v : vector A n) (i : N) (H : i < n), A
|
Π (A : Type) (n : N) (v : vector A n) (i : N) (H : i < n), A
|
||||||
|
|
||||||
map type --->
|
map type --->
|
||||||
[33mΠ[0m (A B C : [36mType[0m) (n : N) (f : A [33m→[0m B [33m→[0m C) (v1 : vector A n) (v2 : vector B n), vector C n
|
Π (A B C : Type) (n : N) (f : A → B → C) (v1 : vector A n) (v2 : vector B n), vector C n
|
||||||
|
|
||||||
map normal form -->
|
map normal form -->
|
||||||
[33mλ[0m (A B C : [36mType[0m)
|
λ (A B C : Type)
|
||||||
(n : N)
|
(n : N)
|
||||||
(f : A [33m→[0m B [33m→[0m C)
|
(f : A → B → C)
|
||||||
(v1 : [33mΠ[0m (i : N) (H : i < n), A)
|
(v1 : Π (i : N) (H : i < n), A)
|
||||||
(v2 : [33mΠ[0m (i : N) (H : i < n), B)
|
(v2 : Π (i : N) (H : i < n), B)
|
||||||
(i : N)
|
(i : N)
|
||||||
(H : i < n),
|
(H : i < n),
|
||||||
f (v1 i H) (v2 i H)
|
f (v1 i H) (v2 i H)
|
||||||
|
|
||||||
update normal form -->
|
update normal form -->
|
||||||
[33mλ[0m (A : [36mType[0m) (n : N) (v : [33mΠ[0m (i : N) (H : i < n), A) (i : N) (d : A) (j : N) (H : j < n), ite A (j = i) d (v j H)
|
λ (A : Type) (n : N) (v : Π (i : N) (H : i < n), A) (i : N) (d : A) (j : N) (H : j < n), ite A (j = i) d (v j H)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Variable a : Bool
|
Variable a : Bool
|
||||||
Variable b : Bool
|
Variable b : Bool
|
||||||
(* Conjunctions *)
|
(* Conjunctions *)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set option: pp::colors
|
||||||
Assumed: a
|
Assumed: a
|
||||||
Assumed: b
|
Assumed: b
|
||||||
a ∧ b
|
a ∧ b
|
||||||
|
@ -17,6 +18,6 @@ ite Bool a a ⊤
|
||||||
a
|
a
|
||||||
Assumed: H1
|
Assumed: H1
|
||||||
Assumed: H2
|
Assumed: H2
|
||||||
[33mΠ[0m (a b : Bool) (H1 : a ⇒ b) (H2 : a), b
|
Π (a b : Bool) (H1 : a ⇒ b) (H2 : a), b
|
||||||
MP H2 H1
|
MP H2 H1
|
||||||
b
|
b
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Definition xor (x y : Bool) : Bool := (not x) = y
|
Definition xor (x y : Bool) : Bool := (not x) = y
|
||||||
Infixr 50 ⊕ : xor
|
Infixr 50 ⊕ : xor
|
||||||
Show xor true false
|
Show xor true false
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
|
Set option: pp::colors
|
||||||
Defined: xor
|
Defined: xor
|
||||||
⊤ ⊕ ⊥
|
⊤ ⊕ ⊥
|
||||||
⊥
|
⊥
|
||||||
⊤
|
⊤
|
||||||
Assumed: a
|
Assumed: a
|
||||||
a ⊕ a ⊕ a
|
a ⊕ a ⊕ a
|
||||||
[33mΠ[0m (A : [36mType[0m u) (a b : A) (P : A [33m→[0m Bool) (H1 : P a) (H2 : a = b), P b
|
Π (A : Type u) (a b : A) (P : A → Bool) (H1 : P a) (H2 : a = b), P b
|
||||||
Proved: EM2
|
Proved: EM2
|
||||||
[33mΠ[0m a : Bool, a ∨ ¬ a
|
Π a : Bool, a ∨ ¬ a
|
||||||
a ∨ ¬ a
|
a ∨ ¬ a
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Show (fun x : Bool, (fun y : Bool, x /\ y))
|
Show (fun x : Bool, (fun y : Bool, x /\ y))
|
||||||
Show let x := true,
|
Show let x := true,
|
||||||
y := true
|
y := true
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
[33mλ[0m x y : Bool, x ∧ y
|
Set option: pp::colors
|
||||||
[33mlet[0m x [33m:=[0m ⊤,
|
λ x y : Bool, x ∧ y
|
||||||
y [33m:=[0m ⊤,
|
let x := ⊤,
|
||||||
z [33m:=[0m x ∧ y,
|
y := ⊤,
|
||||||
f [33m:=[0m [33mλ[0m arg1 arg2 : Bool, arg1 ∧ arg2 ⇔ arg2 ∧ arg1 ⇔ arg1 ∨ arg2 ∨ arg2
|
z := x ∧ y,
|
||||||
[33min[0m (f x y) ∨ z
|
f := λ arg1 arg2 : Bool, arg1 ∧ arg2 ⇔ arg2 ∧ arg1 ⇔ arg1 ∨ arg2 ∨ arg2
|
||||||
|
in (f x y) ∨ z
|
||||||
⊤
|
⊤
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Show fun x : Bool, (fun x : Bool, x).
|
Show fun x : Bool, (fun x : Bool, x).
|
||||||
Show let x := true,
|
Show let x := true,
|
||||||
y := true
|
y := true
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
[33mλ[0m x x : Bool, x
|
Set option: pp::colors
|
||||||
[33mlet[0m x [33m:=[0m ⊤, y [33m:=[0m ⊤, z [33m:=[0m x ∧ y, f [33m:=[0m [33mλ[0m x y : Bool, x ∧ y ⇔ y ∧ x ⇔ x ∨ y ∨ y [33min[0m (f x y) ∨ z
|
λ x x : Bool, x
|
||||||
|
let x := ⊤, y := ⊤, z := x ∧ y, f := λ x y : Bool, x ∧ y ⇔ y ∧ x ⇔ x ∨ y ∨ y in (f x y) ∨ z
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Show Int -> Int -> Int
|
Show Int -> Int -> Int
|
||||||
Variable f : Int -> Int -> Int
|
Variable f : Int -> Int -> Int
|
||||||
Eval f 0
|
Eval f 0
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
Int [33m→[0m Int [33m→[0m Int
|
Set option: pp::colors
|
||||||
|
Int → Int → Int
|
||||||
Assumed: f
|
Assumed: f
|
||||||
f 0
|
f 0
|
||||||
Int [33m→[0m Int
|
Int → Int
|
||||||
Int
|
Int
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Variable x : Type max u+1+2 m+1 m+2 3
|
Variable x : Type max u+1+2 m+1 m+2 3
|
||||||
Check x
|
Check x
|
||||||
Variable f : Type u+10 -> Type
|
Variable f : Type u+10 -> Type
|
||||||
|
|
|
@ -1,20 +1,21 @@
|
||||||
|
Set option: pp::colors
|
||||||
Assumed: x
|
Assumed: x
|
||||||
[36mType[0m u+3 ⊔ m+2 ⊔ 3
|
Type u+3 ⊔ m+2 ⊔ 3
|
||||||
Assumed: f
|
Assumed: f
|
||||||
[36mType[0m u+10 [33m→[0m [36mType[0m
|
Type u+10 → Type
|
||||||
[36mType[0m
|
Type
|
||||||
[36mType[0m 5
|
Type 5
|
||||||
[36mType[0m u+3 ⊔ m+2 ⊔ 3
|
Type u+3 ⊔ m+2 ⊔ 3
|
||||||
[36mType[0m u+1 ⊔ m+1
|
Type u+1 ⊔ m+1
|
||||||
[36mType[0m u+3
|
Type u+3
|
||||||
[36mType[0m u+4
|
Type u+4
|
||||||
[36mType[0m u+1 ⊔ m+1
|
Type u+1 ⊔ m+1
|
||||||
[36mType[0m u+1 ⊔ m+1 ⊔ 4
|
Type u+1 ⊔ m+1 ⊔ 4
|
||||||
[36mType[0m u+1 ⊔ m ⊔ 3
|
Type u+1 ⊔ m ⊔ 3
|
||||||
[36mType[0m u+2 ⊔ m+1 ⊔ 4
|
Type u+2 ⊔ m+1 ⊔ 4
|
||||||
[36mType[0m u [33m→[0m [36mType[0m 5
|
Type u → Type 5
|
||||||
[36mType[0m u+1 ⊔ 6
|
Type u+1 ⊔ 6
|
||||||
[36mType[0m m+1 ⊔ 4 ⊔ u+6
|
Type m+1 ⊔ 4 ⊔ u+6
|
||||||
[36mType[0m m ⊔ 3 [33m→[0m [36mType[0m u [33m→[0m [36mType[0m 5
|
Type m ⊔ 3 → Type u → Type 5
|
||||||
[36mType[0m m+1 ⊔ 6 ⊔ u+1
|
Type m+1 ⊔ 6 ⊔ u+1
|
||||||
[36mType[0m u
|
Type u
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Variable f : Type -> Bool
|
Variable f : Type -> Bool
|
||||||
Show forall a b : Type, (f a) = (f b)
|
Show forall a b : Type, (f a) = (f b)
|
||||||
Variable g : Bool -> Bool -> Bool
|
Variable g : Bool -> Bool -> Bool
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
|
Set option: pp::colors
|
||||||
Assumed: f
|
Assumed: f
|
||||||
[33m∀[0m a b : [36mType[0m, (f a) = (f b)
|
∀ a b : Type, (f a) = (f b)
|
||||||
Assumed: g
|
Assumed: g
|
||||||
[33m∀[0m (a b : [36mType[0m) (c : Bool), g c ((f a) = (f b))
|
∀ (a b : Type) (c : Bool), g c ((f a) = (f b))
|
||||||
[33m∃[0m (a b : [36mType[0m) (c : Bool), g c ((f a) = (f b))
|
∃ (a b : Type) (c : Bool), g c ((f a) = (f b))
|
||||||
[33m∀[0m (a b : [36mType[0m) (c : Bool), (g c (f a)) = (f b) ⇒ (f a)
|
∀ (a b : Type) (c : Bool), (g c (f a)) = (f b) ⇒ (f a)
|
||||||
Bool
|
Bool
|
||||||
[33m∀[0m (a b : [36mType[0m) (c : Bool), g c ((f a) = (f b))
|
∀ (a b : Type) (c : Bool), g c ((f a) = (f b))
|
||||||
[33m∀[0m a b : [36mType[0m, (f a) = (f b)
|
∀ a b : Type, (f a) = (f b)
|
||||||
[33m∃[0m a b : [36mType[0m, (f a) = (f b) ∧ (f a)
|
∃ a b : Type, (f a) = (f b) ∧ (f a)
|
||||||
[33m∃[0m a b : [36mType[0m, (f a) = (f b) ∨ (f b)
|
∃ a b : Type, (f a) = (f b) ∨ (f b)
|
||||||
Assumed: a
|
Assumed: a
|
||||||
(f a) ∨ (f a)
|
(f a) ∨ (f a)
|
||||||
(f a) = a ∨ (f a)
|
(f a) = a ∨ (f a)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Variable f : Type -> Bool
|
Variable f : Type -> Bool
|
||||||
Variable g : Type -> Type -> Bool
|
Variable g : Type -> Type -> Bool
|
||||||
Show forall (a b : Type), exists (c : Type), (g a b) = (f c)
|
Show forall (a b : Type), exists (c : Type), (g a b) = (f c)
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
Set option: pp::colors
|
||||||
Assumed: f
|
Assumed: f
|
||||||
Assumed: g
|
Assumed: g
|
||||||
[33m∀[0m a b : [36mType[0m, [33m∃[0m c : [36mType[0m, (g a b) = (f c)
|
∀ a b : Type, ∃ c : Type, (g a b) = (f c)
|
||||||
Bool
|
Bool
|
||||||
([33mλ[0m a : [36mType[0m,
|
(λ a : Type,
|
||||||
([33mλ[0m b : [36mType[0m, ite Bool (([33mλ[0m x : [36mType[0m, ite Bool ((g a b) = (f x)) ⊥ ⊤) = ([33mλ[0m x : [36mType[0m, ⊤)) ⊥ ⊤) =
|
(λ b : Type, ite Bool ((λ x : Type, ite Bool ((g a b) = (f x)) ⊥ ⊤) = (λ x : Type, ⊤)) ⊥ ⊤) =
|
||||||
([33mλ[0m x : [36mType[0m, ⊤)) =
|
(λ x : Type, ⊤)) =
|
||||||
([33mλ[0m x : [36mType[0m, ⊤)
|
(λ x : Type, ⊤)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Set lean::parser::verbose false.
|
Set lean::parser::verbose false.
|
||||||
Notation 10 if _ then _ : implies.
|
Notation 10 if _ then _ : implies.
|
||||||
Show Environment 1.
|
Show Environment 1.
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
[34mNotation[0m 10 if _ then _ : implies
|
Set option: pp::colors
|
||||||
|
Notation 10 if _ then _ : implies
|
||||||
if ⊤ then ⊥
|
if ⊤ then ⊥
|
||||||
if ⊤ then (if a then ⊥)
|
if ⊤ then (if a then ⊥)
|
||||||
implies true (implies a false)
|
implies true (implies a false)
|
||||||
[34mNotation[0m 100 _ |- _ ; _ : f
|
Notation 100 _ |- _ ; _ : f
|
||||||
f c d e
|
f c d e
|
||||||
c |- d ; e
|
c |- d ; e
|
||||||
(a !) !
|
(a !) !
|
||||||
|
@ -10,7 +11,7 @@ fact (fact a)
|
||||||
[ c ; d ]
|
[ c ; d ]
|
||||||
[ c ; ([ d ; e ]) ]
|
[ c ; ([ d ; e ]) ]
|
||||||
g c (g d e)
|
g c (g d e)
|
||||||
[34mNotation[0m 40 _ << _ end : h
|
Notation 40 _ << _ end : h
|
||||||
d << e end
|
d << e end
|
||||||
[ c ; d << e end ]
|
[ c ; d << e end ]
|
||||||
g c (h d e)
|
g c (h d e)
|
||||||
|
|
|
@ -7,6 +7,7 @@ Show f n1 n2
|
||||||
Show f (fun x : N -> N, x) (fun y : _, y)
|
Show f (fun x : N -> N, x) (fun y : _, y)
|
||||||
Variable EqNice {A : Type} (lhs rhs : A) : Bool
|
Variable EqNice {A : Type} (lhs rhs : A) : Bool
|
||||||
Infix 50 === : EqNice
|
Infix 50 === : EqNice
|
||||||
|
Set pp::colors false
|
||||||
Show n1 === n2
|
Show n1 === n2
|
||||||
Check f n1 n2
|
Check f n1 n2
|
||||||
Check Congr::explicit
|
Check Congr::explicit
|
||||||
|
|
|
@ -6,9 +6,10 @@
|
||||||
f::explicit N n1 n2
|
f::explicit N n1 n2
|
||||||
f::explicit ((N [33m→[0m N) [33m→[0m N [33m→[0m N) ([33mλ[0m x : N [33m→[0m N, x) ([33mλ[0m y : N [33m→[0m N, y)
|
f::explicit ((N [33m→[0m N) [33m→[0m N [33m→[0m N) ([33mλ[0m x : N [33m→[0m N, x) ([33mλ[0m y : N [33m→[0m N, y)
|
||||||
Assumed: EqNice
|
Assumed: EqNice
|
||||||
|
Set option: pp::colors
|
||||||
EqNice::explicit N n1 n2
|
EqNice::explicit N n1 n2
|
||||||
N
|
N
|
||||||
[33mΠ[0m (A : [36mType[0m u) (B : A [33m→[0m [36mType[0m u) (f g : [33mΠ[0m x : A, B x) (a b : A) (H1 : f = g) (H2 : a = b), (f a) = (g b)
|
Π (A : Type u) (B : A → Type u) (f g : Π x : A, B x) (a b : A) (H1 : f = g) (H2 : a = b), (f a) = (g b)
|
||||||
f::explicit N n1 n2
|
f::explicit N n1 n2
|
||||||
Assumed: a
|
Assumed: a
|
||||||
Assumed: b
|
Assumed: b
|
||||||
|
@ -16,13 +17,13 @@ f::explicit N n1 n2
|
||||||
Assumed: g
|
Assumed: g
|
||||||
Assumed: H1
|
Assumed: H1
|
||||||
Proved: Pr
|
Proved: Pr
|
||||||
[34mAxiom[0m H1 : a = b ∧ b = c
|
Axiom H1 : a = b ∧ b = c
|
||||||
[34mTheorem[0m Pr : (g a) = (g c) [33m:=[0m
|
Theorem Pr : (g a) = (g c) :=
|
||||||
[33mlet[0m κ::1 [33m:=[0m Trans::explicit
|
let κ::1 := Trans::explicit
|
||||||
N
|
N
|
||||||
a
|
a
|
||||||
b
|
b
|
||||||
c
|
c
|
||||||
(Conjunct1::explicit (a = b) (b = c) H1)
|
(Conjunct1::explicit (a = b) (b = c) H1)
|
||||||
(Conjunct2::explicit (a = b) (b = c) H1)
|
(Conjunct2::explicit (a = b) (b = c) H1)
|
||||||
[33min[0m Congr::explicit N ([33mλ[0m x : N, N) g g a c (Refl::explicit (N [33m→[0m N) g) κ::1
|
in Congr::explicit N (λ x : N, N) g g a c (Refl::explicit (N → N) g) κ::1
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Variable N : Type
|
Variable N : Type
|
||||||
Variable a : N
|
Variable a : N
|
||||||
Variable b : N
|
Variable b : N
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set option: pp::colors
|
||||||
Assumed: N
|
Assumed: N
|
||||||
Assumed: a
|
Assumed: a
|
||||||
Assumed: b
|
Assumed: b
|
||||||
|
@ -5,5 +6,5 @@ a ≃ b
|
||||||
Bool
|
Bool
|
||||||
Set option: lean::pp::implicit
|
Set option: lean::pp::implicit
|
||||||
heq::explicit N a b
|
heq::explicit N a b
|
||||||
heq::explicit [36mType[0m 2 [36mType[0m 1 [36mType[0m 1
|
heq::explicit Type 2 Type 1 Type 1
|
||||||
heq::explicit Bool ⊤ ⊥
|
heq::explicit Bool ⊤ ⊥
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Variable N : Type
|
Variable N : Type
|
||||||
Variable h : N -> N -> N
|
Variable h : N -> N -> N
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,32 @@
|
||||||
|
Set option: pp::colors
|
||||||
Assumed: N
|
Assumed: N
|
||||||
Assumed: h
|
Assumed: h
|
||||||
Proved: CongrH
|
Proved: CongrH
|
||||||
Set option: lean::pp::implicit
|
Set option: lean::pp::implicit
|
||||||
[34mTheorem[0m CongrH {a1 a2 b1 b2 : N} (H1 : a1 = b1) (H2 : a2 = b2) : (h a1 a2) = (h b1 b2) [33m:=[0m
|
Theorem CongrH {a1 a2 b1 b2 : N} (H1 : a1 = b1) (H2 : a2 = b2) : (h a1 a2) = (h b1 b2) :=
|
||||||
Congr::explicit
|
Congr::explicit
|
||||||
N
|
N
|
||||||
([33mλ[0m x : N, N)
|
(λ x : N, N)
|
||||||
(h a1)
|
(h a1)
|
||||||
(h b1)
|
(h b1)
|
||||||
a2
|
a2
|
||||||
b2
|
b2
|
||||||
(Congr::explicit N ([33mλ[0m x : N, N [33m→[0m N) h h a1 b1 (Refl::explicit (N [33m→[0m N [33m→[0m N) h) H1)
|
(Congr::explicit N (λ x : N, N → N) h h a1 b1 (Refl::explicit (N → N → N) h) H1)
|
||||||
H2
|
H2
|
||||||
[34mTheorem[0m CongrH::explicit (a1 a2 b1 b2 : N) (H1 : a1 = b1) (H2 : a2 = b2) : (h a1 a2) = (h b1 b2) [33m:=[0m
|
Theorem CongrH::explicit (a1 a2 b1 b2 : N) (H1 : a1 = b1) (H2 : a2 = b2) : (h a1 a2) = (h b1 b2) :=
|
||||||
CongrH::explicit a1 a2 b1 b2 H1 H2
|
CongrH::explicit a1 a2 b1 b2 H1 H2
|
||||||
Set option: lean::pp::implicit
|
Set option: lean::pp::implicit
|
||||||
[34mTheorem[0m CongrH {a1 a2 b1 b2 : N} (H1 : a1 = b1) (H2 : a2 = b2) : (h a1 a2) = (h b1 b2) [33m:=[0m Congr (Congr (Refl h) H1) H2
|
Theorem CongrH {a1 a2 b1 b2 : N} (H1 : a1 = b1) (H2 : a2 = b2) : (h a1 a2) = (h b1 b2) := Congr (Congr (Refl h) H1) H2
|
||||||
[34mTheorem[0m CongrH::explicit (a1 a2 b1 b2 : N) (H1 : a1 = b1) (H2 : a2 = b2) : (h a1 a2) = (h b1 b2) [33m:=[0m CongrH H1 H2
|
Theorem CongrH::explicit (a1 a2 b1 b2 : N) (H1 : a1 = b1) (H2 : a2 = b2) : (h a1 a2) = (h b1 b2) := CongrH H1 H2
|
||||||
Proved: Example1
|
Proved: Example1
|
||||||
Set option: lean::pp::implicit
|
Set option: lean::pp::implicit
|
||||||
[34mTheorem[0m Example1 (a b c d : N) (H : a = b ∧ b = c ∨ a = d ∧ d = c) : (h a b) = (h c b) [33m:=[0m
|
Theorem Example1 (a b c d : N) (H : a = b ∧ b = c ∨ a = d ∧ d = c) : (h a b) = (h c b) :=
|
||||||
DisjCases::explicit
|
DisjCases::explicit
|
||||||
(a = b ∧ b = c)
|
(a = b ∧ b = c)
|
||||||
(a = d ∧ d = c)
|
(a = d ∧ d = c)
|
||||||
((h a b) = (h c b))
|
((h a b) = (h c b))
|
||||||
H
|
H
|
||||||
([33mλ[0m H1 : a = b ∧ b = c,
|
(λ H1 : a = b ∧ b = c,
|
||||||
CongrH::explicit
|
CongrH::explicit
|
||||||
a
|
a
|
||||||
b
|
b
|
||||||
|
@ -39,7 +40,7 @@
|
||||||
(Conjunct1::explicit (a = b) (b = c) H1)
|
(Conjunct1::explicit (a = b) (b = c) H1)
|
||||||
(Conjunct2::explicit (a = b) (b = c) H1))
|
(Conjunct2::explicit (a = b) (b = c) H1))
|
||||||
(Refl::explicit N b))
|
(Refl::explicit N b))
|
||||||
([33mλ[0m H1 : a = d ∧ d = c,
|
(λ H1 : a = d ∧ d = c,
|
||||||
CongrH::explicit
|
CongrH::explicit
|
||||||
a
|
a
|
||||||
b
|
b
|
||||||
|
@ -55,13 +56,13 @@
|
||||||
(Refl::explicit N b))
|
(Refl::explicit N b))
|
||||||
Proved: Example2
|
Proved: Example2
|
||||||
Set option: lean::pp::implicit
|
Set option: lean::pp::implicit
|
||||||
[34mTheorem[0m Example2 (a b c d : N) (H : a = b ∧ b = c ∨ a = d ∧ d = c) : (h a b) = (h c b) [33m:=[0m
|
Theorem Example2 (a b c d : N) (H : a = b ∧ b = c ∨ a = d ∧ d = c) : (h a b) = (h c b) :=
|
||||||
DisjCases::explicit
|
DisjCases::explicit
|
||||||
(a = b ∧ b = c)
|
(a = b ∧ b = c)
|
||||||
(a = d ∧ d = c)
|
(a = d ∧ d = c)
|
||||||
((h a b) = (h c b))
|
((h a b) = (h c b))
|
||||||
H
|
H
|
||||||
([33mλ[0m H1 : a = b ∧ b = c,
|
(λ H1 : a = b ∧ b = c,
|
||||||
CongrH::explicit
|
CongrH::explicit
|
||||||
a
|
a
|
||||||
b
|
b
|
||||||
|
@ -75,7 +76,7 @@
|
||||||
(Conjunct1::explicit (a = b) (b = c) H1)
|
(Conjunct1::explicit (a = b) (b = c) H1)
|
||||||
(Conjunct2::explicit (a = b) (b = c) H1))
|
(Conjunct2::explicit (a = b) (b = c) H1))
|
||||||
(Refl::explicit N b))
|
(Refl::explicit N b))
|
||||||
([33mλ[0m H1 : a = d ∧ d = c,
|
(λ H1 : a = d ∧ d = c,
|
||||||
CongrH::explicit
|
CongrH::explicit
|
||||||
a
|
a
|
||||||
b
|
b
|
||||||
|
@ -91,16 +92,16 @@
|
||||||
(Refl::explicit N b))
|
(Refl::explicit N b))
|
||||||
Proved: Example3
|
Proved: Example3
|
||||||
Set option: lean::pp::implicit
|
Set option: lean::pp::implicit
|
||||||
[34mTheorem[0m Example3 (a b c d e : N) (H : a = b ∧ b = e ∧ b = c ∨ a = d ∧ d = c) : (h a b) = (h c b) [33m:=[0m
|
Theorem Example3 (a b c d e : N) (H : a = b ∧ b = e ∧ b = c ∨ a = d ∧ d = c) : (h a b) = (h c b) :=
|
||||||
DisjCases
|
DisjCases
|
||||||
H
|
H
|
||||||
([33mλ[0m H1 : a = b ∧ b = e ∧ b = c, CongrH (Trans (Conjunct1 H1) (Conjunct2 (Conjunct2 H1))) (Refl b))
|
(λ H1 : a = b ∧ b = e ∧ b = c, CongrH (Trans (Conjunct1 H1) (Conjunct2 (Conjunct2 H1))) (Refl b))
|
||||||
([33mλ[0m H1 : a = d ∧ d = c, CongrH (Trans (Conjunct1 H1) (Conjunct2 H1)) (Refl b))
|
(λ H1 : a = d ∧ d = c, CongrH (Trans (Conjunct1 H1) (Conjunct2 H1)) (Refl b))
|
||||||
Proved: Example4
|
Proved: Example4
|
||||||
Set option: lean::pp::implicit
|
Set option: lean::pp::implicit
|
||||||
[34mTheorem[0m Example4 (a b c d e : N) (H : a = b ∧ b = e ∧ b = c ∨ a = d ∧ d = c) : (h a c) = (h c a) [33m:=[0m
|
Theorem Example4 (a b c d e : N) (H : a = b ∧ b = e ∧ b = c ∨ a = d ∧ d = c) : (h a c) = (h c a) :=
|
||||||
DisjCases
|
DisjCases
|
||||||
H
|
H
|
||||||
([33mλ[0m H1 : a = b ∧ b = e ∧ b = c,
|
(λ H1 : a = b ∧ b = e ∧ b = c,
|
||||||
[33mlet[0m AeqC [33m:=[0m Trans (Conjunct1 H1) (Conjunct2 (Conjunct2 H1)) [33min[0m CongrH AeqC (Symm AeqC))
|
let AeqC := Trans (Conjunct1 H1) (Conjunct2 (Conjunct2 H1)) in CongrH AeqC (Symm AeqC))
|
||||||
([33mλ[0m H1 : a = d ∧ d = c, [33mlet[0m AeqC [33m:=[0m Trans (Conjunct1 H1) (Conjunct2 H1) [33min[0m CongrH AeqC (Symm AeqC))
|
(λ H1 : a = d ∧ d = c, let AeqC := Trans (Conjunct1 H1) (Conjunct2 H1) in CongrH AeqC (Symm AeqC))
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Variable f : Pi (A : Type), A -> Bool
|
Variable f : Pi (A : Type), A -> Bool
|
||||||
Show fun (A B : Type) (a : _), f B a
|
Show fun (A B : Type) (a : _), f B a
|
||||||
(* The following one should produce an error *)
|
(* The following one should produce an error *)
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
|
Set option: pp::colors
|
||||||
Assumed: f
|
Assumed: f
|
||||||
[33mλ[0m (A B : [36mType[0m) (a : B), f B a
|
λ (A B : Type) (a : B), f B a
|
||||||
Error (line: 4, pos: 40) application type mismatch during term elaboration at term
|
Error (line: 5, pos: 40) application type mismatch during term elaboration at term
|
||||||
f B a
|
f B a
|
||||||
Elaborator state
|
Elaborator state
|
||||||
?M0 := [31m[unassigned][0m
|
?M0 := [unassigned]
|
||||||
?M1 := [31m[unassigned][0m
|
?M1 := [unassigned]
|
||||||
#0 ≈ [33mlift[0m:0:2 ?M0
|
#0 ≈ lift:0:2 ?M0
|
||||||
Assumed: myeq
|
Assumed: myeq
|
||||||
myeq ([33mΠ[0m (A : [36mType[0m) (a : A), A) ([33mλ[0m (A : [36mType[0m) (a : A), a) ([33mλ[0m (B : [36mType[0m) (b : B), b)
|
myeq (Π (A : Type) (a : A), A) (λ (A : Type) (a : A), a) (λ (B : Type) (b : B), b)
|
||||||
Bool
|
Bool
|
||||||
Assumed: R
|
Assumed: R
|
||||||
Assumed: h
|
Assumed: h
|
||||||
Bool [33m→[0m ([33mΠ[0m (f1 g1 : [33mΠ[0m A : [36mType[0m, R A) (G : [33mΠ[0m A : [36mType[0m, myeq (R A) (f1 A) (g1 A)), Bool)
|
Bool → (Π (f1 g1 : Π A : Type, R A) (G : Π A : Type, myeq (R A) (f1 A) (g1 A)), Bool)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
Set pp::colors false
|
||||||
Check fun (A : Type) (a : A),
|
Check fun (A : Type) (a : A),
|
||||||
let b := a
|
let b := a
|
||||||
in b
|
in b
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
[33mΠ[0m (A : [36mType[0m) (a : A), A
|
Set option: pp::colors
|
||||||
|
Π (A : Type) (a : A), A
|
||||||
Assumed: g
|
Assumed: g
|
||||||
Defined: f
|
Defined: f
|
||||||
|
|
Loading…
Add table
Reference in a new issue