diff --git a/tests/lean/hott/360_2.hlean b/tests/lean/hott/360_2.hlean index 0cbe2b6e8..1b2f759c1 100644 --- a/tests/lean/hott/360_2.hlean +++ b/tests/lean/hott/360_2.hlean @@ -1,4 +1,4 @@ -open truncation +open is_trunc --structure is_contr [class] (A : Type) : Type context diff --git a/tests/lean/hott/433.hlean b/tests/lean/hott/433.hlean index bd31d2a00..c4fabc56c 100644 --- a/tests/lean/hott/433.hlean +++ b/tests/lean/hott/433.hlean @@ -24,23 +24,23 @@ namespace pi /- Now we show how these things compute. -/ - definition apD10_path_pi [H : funext] (h : f ∼ g) : apD10 (path_pi h) ∼ h := + definition apD10_path_pi [H : funext] (h : f ∼ g) : apD10 (eq_of_homotopy h) ∼ h := apD10 (retr apD10 h) - definition path_pi_eta [H : funext] (p : f = g) : path_pi (apD10 p) = p := + definition path_pi_eta [H : funext] (p : f = g) : eq_of_homotopy (apD10 p) = p := sect apD10 p - definition path_pi_idp [H : funext] : path_pi (λx : A, refl (f x)) = refl f := + definition path_pi_idp [H : funext] : eq_of_homotopy (λx : A, refl (f x)) = refl f := !path_pi_eta /- The identification of the path space of a dependent function space, up to equivalence, is of course just funext. -/ definition path_equiv_homotopy [H : funext] (f g : Πx, B x) : (f = g) ≃ (f ∼ g) := - equiv.mk _ !funext.ap + equiv.mk _ !funext.elim definition is_equiv_path_pi [instance] [H : funext] (f g : Πx, B x) - : is_equiv (@path_pi _ _ _ f g) := - inv_closed apD10 + : is_equiv (@eq_of_homotopy _ _ _ f g) := + is_equiv_inv apD10 definition homotopy_equiv_path [H : funext] (f g : Πx, B x) : (f ∼ g) ≃ (f = g) := equiv.mk _ !is_equiv_path_pi @@ -50,7 +50,7 @@ namespace pi protected definition transport (p : a = a') (f : Π(b : B a), C a b) : (transport (λa, Π(b : B a), C a b) p f) - ∼ (λb, transport (C a') !transport_pV (transportD _ _ p _ (f (p⁻¹ ▹ b)))) := + ∼ (λb, transport (C a') !tr_inv_tr (transportD _ _ p _ (f (p⁻¹ ▹ b)))) := eq.rec_on p (λx, idp) /- A special case of [transport_pi] where the type [B] does not depend on [A], @@ -63,7 +63,7 @@ namespace pi /- The action of maps given by lambda. -/ definition ap_lambdaD [H : funext] {C : A' → Type} (p : a = a') (f : Πa b, C b) : - ap (λa b, f a b) p = path_pi (λb, ap (λa, f a b) p) := + ap (λa b, f a b) p = eq_of_homotopy (λb, ap (λa, f a b) p) := begin apply (eq.rec_on p), apply inverse, @@ -85,7 +85,7 @@ namespace pi (Π(b : B a), transportD B (λ(a : A) (b : B a), C ⟨a, b⟩) p b (f b) = g (eq.transport B p b)) -/ definition dpath_pi_sigma {C : (Σa, B a) → Type} (p : a = a') (f : Π(b : B a), C ⟨a, b⟩) (g : Π(b' : B a'), C ⟨a', b'⟩) : - (Π(b : B a), (sigma.path p idp) ▹ (f b) = g (p ▹ b)) ≃ (Π(b : B a), p ▹D (f b) = g (p ▹ b)) := + (Π(b : B a), (sigma.sigma_eq p idp) ▹ (f b) = g (p ▹ b)) ≃ (Π(b : B a), p ▹D (f b) = g (p ▹ b)) := eq.rec_on p (λg, !equiv.refl) g end @@ -102,17 +102,17 @@ namespace pi begin apply (adjointify (functor_pi f0 f1) (functor_pi (f0⁻¹) (λ(a : A) (b' : B' (f0⁻¹ a)), transport B (retr f0 a) ((f1 (f0⁻¹ a))⁻¹ b')))), - intro h, apply path_pi, + intro h, apply eq_of_homotopy, esimp {functor_pi, function.compose}, -- simplify (and unfold function_pi and function.compose) --first subgoal intro a', esimp, rewrite adj, rewrite -transport_compose, - rewrite {f1 a' _}(ap_transport _ f1 _), + rewrite {f1 a' _}(fn_tr_eq_tr_fn _ f1 _), rewrite (retr (f1 _) _), apply apD, intro h, beta, - apply path_pi, intro a, esimp, + apply eq_of_homotopy, intro a, esimp, apply (transport_V (λx, retr f0 a ▹ x = h a) (sect (f1 _) _)), esimp {function.id}, apply apD diff --git a/tests/lean/hott/apply_class_issue.hlean b/tests/lean/hott/apply_class_issue.hlean index e36d28a2e..1824583c3 100644 --- a/tests/lean/hott/apply_class_issue.hlean +++ b/tests/lean/hott/apply_class_issue.hlean @@ -1,4 +1,4 @@ -open truncation +open is_trunc context parameters {P : Π(A : Type), A → Type} diff --git a/tests/lean/hott/beginend2.hlean b/tests/lean/hott/beginend2.hlean index c02cbe02c..2a2b9b2a9 100644 --- a/tests/lean/hott/beginend2.hlean +++ b/tests/lean/hott/beginend2.hlean @@ -2,9 +2,9 @@ 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') := + (whisker_right a q) ⬝ (whisker_left p' b) = (whisker_left p b) ⬝ (whisker_right a q') := begin apply (rec_on b), apply (rec_on a), - apply ((concat_1p _)⁻¹), + apply ((idp_con _)⁻¹), end diff --git a/tests/lean/hott/rewriter1.hlean b/tests/lean/hott/rewriter1.hlean index 712936c1f..b21e76d01 100644 --- a/tests/lean/hott/rewriter1.hlean +++ b/tests/lean/hott/rewriter1.hlean @@ -6,7 +6,7 @@ constant f {A : Type} : A → A → A theorem test1 {A : Type} [s : add_comm_group A] (a b c : A) : f (a + 0) (f (a + 0) (a + 0)) = f a (f (0 + a) a) := begin rewrite [ - add_right_id at {1, 3}, -- rewrite 1st and 3rd occurrences + add_zero at {1, 3}, -- rewrite 1st and 3rd occurrences {0 + _}add_comm] -- apply commutativity to (0 + _) end @@ -14,6 +14,6 @@ axiom Ax {A : Type} [s₁ : has_mul A] [s₂ : has_one A] (a : A) : f (a * 1) (a theorem test2 {A : Type} [s : comm_group A] (a b c : A) : f a a = 1 := begin - rewrite [-(mul_right_id a), -- - means apply symmetry, rewrite 0 ==> a * 0 at 1st and 2nd occurrences + rewrite [-(mul_one a), -- - means apply symmetry, rewrite 0 ==> a * 0 at 1st and 2nd occurrences Ax] -- use Ax as rewrite rule end