fix(tests/lean): adjust tests to recent changes in the lean libraries
This commit is contained in:
parent
71cffd29a0
commit
43633085b9
11 changed files with 47 additions and 89 deletions
19
tests/lean/hott/329.hlean
Normal file
19
tests/lean/hott/329.hlean
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
open eq sigma
|
||||||
|
|
||||||
|
variables {A : Type} {B : A → Type} {C : Πa, B a → Type} {D : Πa b, C a b → Type}
|
||||||
|
{a a' a'' : A} {b b₁ b₂ : B a} {b' : B a'} {b'' : B a''} {u v w : Σa, B a}
|
||||||
|
|
||||||
|
definition path_sigma_dpair (p : a = a') (q : p ▹ b = b') : dpair a b = dpair a' b' :=
|
||||||
|
eq.rec_on p (λb b' q, eq.rec_on q idp) b b' q
|
||||||
|
|
||||||
|
definition path_sigma (p : dpr1 u = dpr1 v) (q : p ▹ dpr2 u = dpr2 v) : u = v :=
|
||||||
|
destruct u
|
||||||
|
(λu1 u2, destruct v (λ v1 v2, path_sigma_dpair))
|
||||||
|
p q
|
||||||
|
|
||||||
|
definition path_path_sigma_lemma' {p1 : a = a'} {p2 : p1 ▹ b = b'} {q2 : p1 ▹ b = b'}
|
||||||
|
(s : idp ▹ p2 = q2) : path_sigma p1 p2 = path_sigma p1 q2 :=
|
||||||
|
begin
|
||||||
|
apply (eq.rec_on s),
|
||||||
|
apply idp,
|
||||||
|
end
|
7
tests/lean/hott/366.hlean
Normal file
7
tests/lean/hott/366.hlean
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
open eq
|
||||||
|
definition foo (A : Type) : Type := Π (a : A), a = a
|
||||||
|
definition thm : Π (A : Type), foo A :=
|
||||||
|
begin
|
||||||
|
intros,
|
||||||
|
apply idp
|
||||||
|
end
|
|
@ -1,9 +1,7 @@
|
||||||
import hott.trunc
|
|
||||||
open truncation
|
open truncation
|
||||||
--structure is_contr [class] (A : Type) : Type
|
|
||||||
|
|
||||||
context
|
context
|
||||||
parameters {P : Π(A : Type), A → Prop}
|
parameters {P : Π(A : Type), A → Type}
|
||||||
|
|
||||||
definition my_contr {A : Type} [H : is_contr A] (a : A) : P A a := sorry
|
definition my_contr {A : Type} [H : is_contr A] (a : A) : P A a := sorry
|
||||||
|
|
10
tests/lean/hott/beginend2.hlean
Normal file
10
tests/lean/hott/beginend2.hlean
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
open eq tactic
|
||||||
|
open eq (rec_on)
|
||||||
|
|
||||||
|
definition concat_whisker2 {A} {x y z : A} (p p' : x = y) (q q' : y = z) (a : p = p') (b : q = q') :
|
||||||
|
(whiskerR a q) ⬝ (whiskerL p' b) = (whiskerL p b) ⬝ (whiskerR a q') :=
|
||||||
|
begin
|
||||||
|
apply (rec_on b),
|
||||||
|
apply (rec_on a),
|
||||||
|
apply ((concat_1p _)⁻¹),
|
||||||
|
end
|
10
tests/lean/hott/get_tac1.hlean
Normal file
10
tests/lean/hott/get_tac1.hlean
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
open eq
|
||||||
|
|
||||||
|
definition concat_pV_p {A : Type} {x y z : A} (p : x = z) (q : y = z) : (p ⬝ q⁻¹) ⬝ q = p :=
|
||||||
|
begin
|
||||||
|
generalize p,
|
||||||
|
apply (eq.rec_on q),
|
||||||
|
intro p,
|
||||||
|
apply (eq.rec_on p),
|
||||||
|
apply idp
|
||||||
|
end
|
|
@ -1,20 +0,0 @@
|
||||||
import hott data.sigma
|
|
||||||
open path sigma
|
|
||||||
|
|
||||||
variables {A : Type} {B : A → Type} {C : Πa, B a → Type} {D : Πa b, C a b → Type}
|
|
||||||
{a a' a'' : A} {b b₁ b₂ : B a} {b' : B a'} {b'' : B a''} {u v w : Σa, B a}
|
|
||||||
|
|
||||||
definition path_sigma_dpair (p : a ≈ a') (q : p ▹ b ≈ b') : dpair a b ≈ dpair a' b' :=
|
|
||||||
path.rec_on p (λb b' q, path.rec_on q idp) b b' q
|
|
||||||
|
|
||||||
definition path_sigma (p : dpr1 u ≈ dpr1 v) (q : p ▹ dpr2 u ≈ dpr2 v) : u ≈ v :=
|
|
||||||
destruct u
|
|
||||||
(λu1 u2, destruct v (λ v1 v2, path_sigma_dpair))
|
|
||||||
p q
|
|
||||||
|
|
||||||
definition path_path_sigma_lemma' {p1 : a ≈ a'} {p2 : p1 ▹ b ≈ b'} {q2 : p1 ▹ b ≈ b'}
|
|
||||||
(s : idp ▹ p2 ≈ q2) : path_sigma p1 p2 ≈ path_sigma p1 q2 :=
|
|
||||||
begin
|
|
||||||
apply (path.rec_on s),
|
|
||||||
apply idp,
|
|
||||||
end
|
|
|
@ -1,8 +0,0 @@
|
||||||
import hott.path
|
|
||||||
open path
|
|
||||||
definition foo (A : Type) : Type := Π (a : A), a ≈ a
|
|
||||||
definition thm : Π (A : Type), foo A :=
|
|
||||||
begin
|
|
||||||
intros,
|
|
||||||
apply idp
|
|
||||||
end
|
|
|
@ -1,12 +0,0 @@
|
||||||
import hott.path
|
|
||||||
|
|
||||||
open path tactic
|
|
||||||
open path (rec_on)
|
|
||||||
|
|
||||||
definition concat_whisker2 {A} {x y z : A} (p p' : x ≈ y) (q q' : y ≈ z) (a : p ≈ p') (b : q ≈ q') :
|
|
||||||
(whiskerR a q) ⬝ (whiskerL p' b) ≈ (whiskerL p b) ⬝ (whiskerR a q') :=
|
|
||||||
begin
|
|
||||||
apply (rec_on b),
|
|
||||||
apply (rec_on a),
|
|
||||||
apply ((concat_1p _)⁻¹),
|
|
||||||
end
|
|
|
@ -1,4 +0,0 @@
|
||||||
import hott.fibrant
|
|
||||||
open prod sum fibrant
|
|
||||||
|
|
||||||
theorem test_fibrant : fibrant (nat × (nat ⊎ nat))
|
|
|
@ -1,11 +0,0 @@
|
||||||
import hott.path
|
|
||||||
open path
|
|
||||||
|
|
||||||
definition concat_pV_p {A : Type} {x y z : A} (p : x ≈ z) (q : y ≈ z) : (p ⬝ q⁻¹) ⬝ q ≈ p :=
|
|
||||||
begin
|
|
||||||
generalize p,
|
|
||||||
apply (path.rec_on q),
|
|
||||||
intro p,
|
|
||||||
apply (path.rec_on p),
|
|
||||||
apply idp
|
|
||||||
end
|
|
|
@ -1,31 +0,0 @@
|
||||||
import hott
|
|
||||||
|
|
||||||
open path
|
|
||||||
set_option pp.beta true
|
|
||||||
|
|
||||||
variables {A : Type} {B : A → Type} {C : Π a : A, B a → Type} {D : Π (a : A) (b : B a), C a b → Type}
|
|
||||||
|
|
||||||
structure foo :=
|
|
||||||
mk :: (a : A) (b : B a) (c : C a b)
|
|
||||||
|
|
||||||
set_option unifier.max_steps 50000
|
|
||||||
|
|
||||||
definition foo.eq {a₁ a₂ : A} {b₁ : B a₁} {b₂ : B a₂} {c₁ : C a₁ b₁} {c₂ : C a₂ b₂}
|
|
||||||
(H₁ : a₁ ≈ a₂)
|
|
||||||
(H₂ : path.rec_on H₁ b₁ ≈ b₂)
|
|
||||||
(H₃ : path.rec_on H₂ (path.rec_on H₁ c₁) ≈ c₂)
|
|
||||||
: foo.mk a₁ b₁ c₁ ≈ foo.mk a₂ b₂ c₂ :=
|
|
||||||
have aux₁: Π (b₂ : B a₁) (c₂ : C a₁ b₂)
|
|
||||||
(H₂ : path.rec_on idp b₁ ≈ b₂)
|
|
||||||
(H₃ : path.rec_on H₂ (path.rec_on idp c₁) ≈ c₂),
|
|
||||||
foo.mk a₁ b₁ c₁ ≈ foo.mk a₁ b₂ c₂, from
|
|
||||||
λ (b₂ : B a₁) (c₂ : C a₁ b₂)
|
|
||||||
(H₂ : b₁ ≈ b₂) (H₃ : path.rec_on H₂ c₁ ≈ c₂),
|
|
||||||
have aux₂ : Π (c₂ : C a₁ b₁) (H₃ : path.rec_on idp c₁ ≈ c₂),
|
|
||||||
foo.mk a₁ b₁ c₁ ≈ foo.mk a₁ b₁ c₂, from
|
|
||||||
λ (c₂ : C a₁ b₁) (H₃ : c₁ ≈ c₂),
|
|
||||||
have aux₃ : foo.mk a₁ b₁ c₁ ≈ foo.mk a₁ b₁ c₁, from
|
|
||||||
idp,
|
|
||||||
path.rec_on H₃ aux₃,
|
|
||||||
path.rec_on H₂ aux₂ c₂ H₃,
|
|
||||||
path.rec_on H₁ aux₁ b₂ c₂ H₂ H₃
|
|
Loading…
Reference in a new issue