Skip to content
Snippets Groups Projects
Commit b96b1976 authored by cschoener's avatar cschoener
Browse files

Formalized all normalization statements, no well-formedness statements.

parent ad630baf
No related branches found
No related tags found
No related merge requests found
......@@ -11,8 +11,7 @@ theory DHOL : ur:?LF =
eqtp: tp ⟶ tp ⟶ type❘ # 1 ≡ 2 prec -5❘ role Judgment❙
subtp: tp ⟶ tp ⟶ type❘ # 1 < 2 prec -2❘ role Judgment❘
= [A,B] {t} t%A ⟶ t%B❙
sub_antisym : {A,B} A<B ⟶ B<A ⟶ A≡B ❘ role Judgment ❙
subtp_antisym: {A,B} A<B ⟶ B<A ⟶ A≡B ❘ role Judgment ❙
wftm_eq: {t,A,Aˈ} t%A ⟶ A≡Aˈ ⟶ t%Aˈ ❙
eqtp_subtp: {A,B} A≡B ⟶ A<B ❘
= [A,B,P] [t,k:t%A] wftm_eq k P ❙
......@@ -21,7 +20,7 @@ theory DHOL : ur:?LF =
subtp_trans: {A,B,C} A<B ⟶ B<C ⟶ A<C ❘
= [A,B,C,P,Q] [t, r: t%A] (Q t (P t r))❙
bool: tp❙
bool_tp: $bool❙
contra = {F} ⊦F ❘# ↯❙
......@@ -30,17 +29,23 @@ theory DHOL : ur:?LF =
eq: tp ⟶ tm ⟶ tm ⟶ tm❘ # 2 = 1 3 prec 10❙
eq_tp: {A,s,t} s%A ⟶ t%A ⟶ s =A t % bool❙
eqtp_sym: {A,Aˈ} A≡Aˈ ⟶ Aˈ≡A❙
eqtp_wf: {A} A≡A ❘
= [A] sub_antisym ([x,k:x%A] k) ([x,k:x%A] k)❙
dep_type_ext: {A,B} {t,tˈ} t%A ⟶ tˈ%A ⟶ ⊦t =A tˈ ⟶ B t ≡ B tˈ❙
eqtp_refl: {A} A≡A ❘
= [A] subtp_antisym ([x,k:x%A] k) ([x,k:x%A] k)❙
eq_refl: {x,A} x%A ⟶ ⊦x =A x ❙
eq_sym: {x,y,A} ⊦x =A y ⟶ ⊦y =A x ❙
dep_type_ext_sym: {A,B} {t,tˈ} t%A ⟶ tˈ%A ⟶ ⊦t =A tˈ ⟶ B tˈ ≡ B t ❘
= [A,B,t,tˈ,P,Q,R] dep_type_ext Q P eq_sym R ❙
eqtp_sym: {A,Aˈ} A≡Aˈ ⟶ Aˈ≡A ❙
eqtp_trans: {A,B,C} A ≡ B ⟶ B ≡ C ⟶ A ≡ C ❘
= [A,B,C,P,Q] subtp_antisym (subtp_trans (eqtp_subtp P) (eqtp_subtp Q)) (subtp_trans (eqtp_subtp eqtp_sym Q) (eqtp_subtp eqtp_sym P)) ❙
eqtp_param: {A,Aˈ,B,Bˈ} A≡Aˈ ⟶ ({x} x%A ⟶ B x ≡ Bˈ x) ⟶ ({x} x%Aˈ ⟶ B x ≡ Bˈ x) ❘
= [A,Aˈ,B,Bˈ,P,Q] [x, r: x%Aˈ] Q x ((eqtp_subtp (eqtp_sym P)) x r)❙
eqtp_sym_map: {A,B,Bˈ} ({x} x%A ⟶ B x ≡ Bˈ x) ⟶ ({x} x%A ⟶ Bˈ x ≡ B x) ❘
= [A,B,Bˈ,P] [x, r: x%A] eqtp_sym (P x r) ❙
eq_refl: {x,A} x%A ⟶ ⊦x =A x ❙
eq_sym: {x,y,A} ⊦x =A y ⟶ ⊦y =A x ❙
eq_param: {A,Aˈ,p,pˈ} A≡Aˈ ⟶ ({x} x%A ⟶ ⊦(p x) =bool (pˈ x)) ⟶ ({x} x%Aˈ ⟶ ⊦(p x) =bool (pˈ x)) ❘
= [A,Aˈ,p,pˈ,P,Q] [x, r: x%Aˈ] Q x ((eqtp_subtp (eqtp_sym P)) x r)❙
......@@ -68,14 +73,14 @@ theory DHOL : ur:?LF =
pi_tp : {A,B} ({x} x%A ⟶ $B x) ⟶ $ Π A [x] B x ❙
lam_tp: {A,Aˈ,B,T} A≡Aˈ ⟶ ({x} x%A ⟶ T x % B x) ⟶ (λ A [x] T x) % (Π Aˈ [x] B x) ❙
lam_eq: {A,Aˈ,B,T,Tˈ} A≡Aˈ ⟶ ({x} x%A ⟶ ⊦(T x) =(B x) (Tˈ x)) ⟶ ⊦(λ A [x] T x) =(Π A [x] B x) (λ Aˈ [x] Tˈ x)❙
app_eq: {A,B,f,fˈ,t,tˈ} ⊦f =(Π A B) fˈ ⟶ ⊦t =A tˈ ⟶ ⊦(f@t) =(B t) (fˈ@tˈ) ❙
lam_eta: {A,B,f} f%(Π A [x] B x) ⟶ ⊦f =(Π A [x] B x) (λ A [x] f @ x) ❙
lam_beta: {A,B,s,t} ({u} u%A ⟶ ((λ A [x] s x) @ u) % (B u)) ⟶ t%A ⟶ ⊦((λ A [x] s x) @ t) =(B t) (s t) ❙
exten_tp: {A,B,f} ({x} x%A ⟶ (f@x)%B x) ⟶ f%(Π A [x] B x) ❙
app_tp: {A,B,f,t} f%(Π A [x] B x) ⟶ t%A ⟶ (f@t)%(B t) ❙
exten_eq: {A,B,f,fˈ} ({x} x%A ⟶ ⊦ (f@x) =(B x) (fˈ@x)) ⟶ ⊦f =(Π A B) fˈ❙
app_tp: {A,B,f,t} f%(Π A [x] B x) ⟶ t%A ⟶ (f@t)%(B t) ❙
app_eq: {A,B,f,fˈ,t,tˈ} ⊦f =(Π A B) fˈ ⟶ ⊦t =A tˈ ⟶ ⊦(f@t) =(B t) (fˈ@tˈ) ❙
spi: tp ⟶ tp ⟶ tp❘ = [A,B] Π A [x] B❘ # 1 %R→ 2 prec 5❙
spi_tp: {A,B} $A ⟶ $B ⟶ $(A→B) ❘
= [A,B,P,Q] pi_tp ([x,k:x%A] Q)❙
......@@ -93,7 +98,7 @@ theory DHOL : ur:?LF =
spi_subtp_lr: {A,Aˈ,B,Bˈ} A<Aˈ ⟶ B<Bˈ ⟶ (Aˈ→B) < (A→Bˈ) ❘
= [A,Aˈ,B,Bˈ,P,Q] subtp_trans (spi_subtp_l P) (spi_subtp_r Q) ❙
spi_eq: {A,Aˈ,B,Bˈ} A≡Aˈ ⟶ B≡Bˈ ⟶ (A→B) ≡ (Aˈ→Bˈ) ❘
= [A,Aˈ,B,Bˈ,P,Q] sub_antisym (spi_subtp_lr (eqtp_subtp eqtp_sym P) (eqtp_subtp Q)) (spi_subtp_lr (eqtp_subtp P) (eqtp_subtp eqtp_sym Q))❙
= [A,Aˈ,B,Bˈ,P,Q] subtp_antisym (spi_subtp_lr (eqtp_subtp eqtp_sym P) (eqtp_subtp Q)) (spi_subtp_lr (eqtp_subtp P) (eqtp_subtp eqtp_sym Q))❙
pi_sub_r: {A,B,Bˈ} ({x} x%A ⟶ B x < Bˈ x) ⟶ (Π A [x] B x) < (Π A [x] Bˈ x) ❘
= [A,B,Bˈ,P] [f, r: f%(Π A [x] B x)] exten_tp [u, v:u%A] (P u v (f@u) (app_tp r v)) ❙
......@@ -102,7 +107,7 @@ theory DHOL : ur:?LF =
pi_sub_lr: {A,Aˈ,B,Bˈ} A<Aˈ ⟶ ({x} x%A ⟶ B x < Bˈ x) ⟶ (Π Aˈ [x] B x) < (Π A [x] Bˈ x) ❘
= [A,Aˈ,B,Bˈ,P,Q] subtp_trans (pi_sub_l P) (pi_sub_r Q)❙
pi_eq: {A,Aˈ,B,Bˈ} A≡Aˈ ⟶ ({x} x%A ⟶ B x ≡ Bˈ x) ⟶ (Π A [x] B x) ≡ (Π Aˈ [x] Bˈ x) ❘
= [A,Aˈ,B,Bˈ,P,Q] sub_antisym (pi_sub_lr (eqtp_subtp (eqtp_sym P)) (eqtp_subtp_map Aˈ B Bˈ (eqtp_param A Aˈ B Bˈ P Q))) (pi_sub_lr A Aˈ Bˈ B (eqtp_subtp P) (eqtp_subtp_map A Bˈ B (eqtp_sym_map A B Bˈ Q))) ❙
= [A,Aˈ,B,Bˈ,P,Q] subtp_antisym (pi_sub_lr (eqtp_subtp (eqtp_sym P)) (eqtp_subtp_map Aˈ B Bˈ (eqtp_param A Aˈ B Bˈ P Q))) (pi_sub_lr A Aˈ Bˈ B (eqtp_subtp P) (eqtp_subtp_map A Bˈ B (eqtp_sym_map A B Bˈ Q))) ❙
refine: tp ⟶ (tm ⟶ tm) ⟶ tp❘# 1 | 2 prec 5❙
refine_tp: {A,p} $A ⟶ ({x} x%A ⟶ p x % bool) ⟶ $A|p❙
......@@ -119,7 +124,7 @@ theory DHOL : ur:?LF =
refine_sub_lr: {A,Aˈ,p,pˈ} A<Aˈ ⟶ ({x} x%A ⟶ (⊦p x ⟶ ⊦pˈ x)) ⟶ A|p < Aˈ|pˈ ❘
= [A,Aˈ,p,pˈ,P,Q] subtp_trans (refine_sub_r Q) (refine_sub_l P)❙
refine_eq: {A,Aˈ,p,pˈ} A≡Aˈ ⟶ ({x} x%A ⟶ ⊦(p x) =bool (pˈ x)) ⟶ A|p ≡ Aˈ|pˈ ❘
= [A,Aˈ,p,pˈ,P,Q] sub_antisym (refine_sub_lr (eqtp_subtp P) ((eq_impl A p pˈ) Q)) (refine_sub_lr (eqtp_subtp eqtp_sym P) ((eq_impl_back_eq A Aˈ p pˈ) P Q)) ❙
= [A,Aˈ,p,pˈ,P,Q] subtp_antisym (refine_sub_lr (eqtp_subtp P) ((eq_impl A p pˈ) Q)) (refine_sub_lr (eqtp_subtp eqtp_sym P) ((eq_impl_back_eq A Aˈ p pˈ) P Q)) ❙
impl: tm ⟶ tm ⟶ tm❘ # 1 ⇒ 2 prec 5❙
impl_tp: {F,G} F%bool ⟶ (⊦F ⟶ G%bool) ⟶ F⇒G % bool ❙
......@@ -140,7 +145,9 @@ theory DHOL : ur:?LF =
not_I: {F,G} (⊦F ⟶ ⊦G) ⟶ (⊦F ⟶ ⊦¬G) ⟶ ⊦¬F ❙
not_E: {F} ⊦¬¬F ⟶ ⊦F ❙
or: tm ⟶ tm ⟶ tm ❘ # 1 ∨ 2 ❘ = [F,G] ¬F ⇒ G ❙
// notation löschen ❙
or: tm ⟶ tm ⟶ tm ❘ # 1 ∨ 2 ❙
// = [F,G] ¬F ⇒ G ❙
or_tp: {F,G} F%bool ⟶ (⊦¬F ⟶ G%bool) ⟶ F∨G % bool ❙
or_tp_nodep: {F,G} F%bool ⟶ G%bool ⟶ F∨G % bool ❘
= [F,G,P,Q] or_tp P [r] Q❙
......@@ -148,24 +155,30 @@ theory DHOL : ur:?LF =
or_Ir: {F,G} F%bool ⟶ ⊦G ⟶ ⊦F∨G ❙
or_E: {F,G,C} ⊦F∨G ⟶ (⊦F ⟶ ⊦C) ⟶ (⊦G ⟶ ⊦C) ⟶ ⊦C ❙
and: tm ⟶ tm ⟶ tm ❘ # 1 ∧ 2 ❘ = [F,G] ¬(F ⇒ ¬G) ❙
// notation löschen ❙
and: tm ⟶ tm ⟶ tm ❘ # 1 ∧ 2 ❙
// = [F,G] ¬(F ⇒ ¬G) ❙
and_tp: {F,G} F%bool ⟶ (⊦F ⟶ G%bool) ⟶ F∧G % bool ❙
and_I: {F,G} ⊦F ⟶ ⊦G ⟶ ⊦F∧G ❙
and_El: {F,G} ⊦F∧G ⟶ ⊦F ❙
and_Er: {F,G} ⊦F∧G ⟶ ⊦G ❙
equivalence: tm ⟶ tm ⟶ tm ❘ # 1 ⇔ 2 ❘ = [F,G] (F ⇒ G) ∧ (G ⇒ F)❙
// notation löschen ❙
equivalence: tm ⟶ tm ⟶ tm ❘ # 1 ⇔ 2 ❙
// = [F,G] (F ⇒ G) ∧ (G ⇒ F)❙
equivalence_tp: {F,G} F%bool ⟶ G%bool ⟶ F⇔G % bool❙
equivalence_I: {F,G} ⊦F⇒G ⟶ ⊦G⇒F ⟶ ⊦F⇔G ❙
equivalence_I: {F,G} (⊦F ⟶ ⊦G)(⊦G ⟶ ⊦F) ⟶ ⊦F⇔G ❙
equivalence_El: {F,G} ⊦F⇔G ⟶ ⊦F⇒G ❙
equivalence_Er: {F,G} ⊦F⇔G ⟶ ⊦G⇒F ❙
forall: tp ⟶ (tm ⟶ tm) ⟶ tm ❘ # ∀ 1 2 ❘ = [A,F] (λ A [x] F x) =(A→bool) (λ A [x] true) ❙
forall: tp ⟶ (tm ⟶ tm) ⟶ tm ❘ # ∀ 1 2 ❙
// = [A,F] (λ A [x] F x) =(A→bool) (λ A [x] true) ❙
forall_tp: {A,p} ({x} x%A ⟶ p x % bool) ⟶ (∀ A [y] p y) % bool ❙
forall_I: {A,p} ({x} x%A ⟶ ⊦p x) ⟶ ⊦∀ A [x] p x ❙
forall_E: {A,p} ⊦(∀ A [x] p x) ⟶ ({x} x%A ⟶ ⊦p x)
forall_E: {A,p,x} ⊦(∀ A [x] p x) ⟶ x%A ⟶ ⊦p x ❙
exists: tp ⟶ (tm ⟶ tm) ⟶ tm ❘ # ∃ 1 2 ❘ = [A,F] ¬(∀ A [x] ¬(F x)) ❙
exists: tp ⟶ (tm ⟶ tm) ⟶ tm ❘ # ∃ 1 2 ❙
// = [A,F] ¬(∀ A [x] ¬(F x)) ❙
exists_tp: {A,p} ({x} x%A ⟶ p x % bool) ⟶ (∃ A [y] p y) % bool ❙
exists_I: {A,p,x} x%A ⟶ ⊦p x ⟶ ⊦∃ A [y] p y ❙
exists_E: {A,F,p} ⊦(∃ A [x] p x) ⟶ ({x} x%A ⟶ ⊦p x ⟶ ⊦F) ⟶ ⊦F ❙
......@@ -174,22 +187,27 @@ theory DHOL : ur:?LF =
bool_ext: {p} ⊦p true ⟶ ⊦p false ⟶ ({x} x%bool ⟶ ⊦p x)❙
equals_u_is_Pi: {A,u} u%A ⟶ (λ A [x] (x =A u))%(Π A [x] bool) ❘
= [A,u,P] (lam_tp A A ([y] bool) ([y] (y =A u)) eqtp_wf ([y,k:y%A] eq_tp k P)) ❙
= [A,u,P] (lam_tp A A ([y] bool) ([y] (y =A u)) eqtp_refl ([y,k:y%A] eq_tp k P)) ❙
equals_u_app_is_bool: {A,t,u} t%A ⟶ u%A ⟶ ((λ A [x] (x =A u)) @ t)%bool❘
= [A,t,u,P,Q] (app_tp (equals_u_is_Pi Q) P) ❙
prop_trans_help: {A,t,u} t%A ⟶ u%A ⟶ ⊦((λ A [x] (x =A u)) @ t) =bool (t =A u)❘
eq_trans_help: {A,t,u} t%A ⟶ u%A ⟶ ⊦((λ A [x] (x =A u)) @ t) =bool (t =A u)❘
= [A,t,u,P,Q] lam_beta ([k,l:k%A] equals_u_app_is_bool l Q) P❙
prop_trans_help2: {A,t,u} t%A ⟶ u%A ⟶ ⊦t =A u ⟶ ⊦((λ A [x] (x =A u) ) @ t) ❘
= [A,t,u,P,Q,R] valid_eq R (prop_trans_help P Q)❙
eq_trans_help2: {A,t,u} t%A ⟶ u%A ⟶ ⊦t =A u ⟶ ⊦((λ A [x] (x =A u) ) @ t) ❘
= [A,t,u,P,Q,R] valid_eq R (eq_trans_help P Q)❙
equals_u: {A,u} u%A ⟶ ⊦(λ A [x] (x =A u)) =(Π A [x] bool) (λ A [x] (x =A u)) ❘
= [A,u,P] eq_refl equals_u_is_Pi P ❙
prop_trans_pre: {A,s,t,u} u%A ⟶ ⊦s =A t ⟶ ⊦((λ A [x] (x =A u)) @ s) =bool ((λ A [x] (x =A u)) @ t) ❘
eq_trans_pre: {A,s,t,u} u%A ⟶ ⊦s =A t ⟶ ⊦((λ A [x] (x =A u)) @ s) =bool ((λ A [x] (x =A u)) @ t) ❘
= [A,s,t,u,P,Q] app_eq A ([x] bool) (λ A [x] (x =A u)) (λ A [x] (x =A u)) s t (equals_u P) Q ❙
prop_trans_pre2: {A,s,t,u} t%A ⟶ u%A ⟶ ⊦s =A t ⟶ ⊦t =A u ⟶ ⊦((λ A [x] (x =A u)) @ s)❘
= [A,s,t,u,P,Q,R,S] valid_eq (prop_trans_help2 A t u P Q S) (prop_trans_pre A s t u Q R) ❙
prop_trans: {A,s,t,u} s%A ⟶ t%A ⟶ u%A ⟶ ⊦s =A t ⟶ ⊦t =A u ⟶ ⊦s =A u ❘
= [A,s,t,u,P,Q,R,S,T] valid_eq_flip (prop_trans_pre2 Q R S T) (prop_trans_help A s u P R) ❙
eq_trans_pre2: {A,s,t,u} t%A ⟶ u%A ⟶ ⊦s =A t ⟶ ⊦t =A u ⟶ ⊦((λ A [x] (x =A u)) @ s)❘
= [A,s,t,u,P,Q,R,S] valid_eq (eq_trans_help2 A t u P Q S) (eq_trans_pre A s t u Q R) ❙
eq_trans: {A,s,t,u} s%A ⟶ t%A ⟶ u%A ⟶ ⊦s =A t ⟶ ⊦t =A u ⟶ ⊦s =A u ❘
= [A,s,t,u,P,Q,R,S,T] valid_eq_flip (eq_trans_pre2 Q R S T) (eq_trans_help A s u P R) ❙
impl_I_trans: {F,G,H,I} ⊦F =bool H ⟶ ⊦G =bool I ⟶ (⊦F⇒G) ⟶ ⊦H⇒I ❘
= [F,G,H,I,P,Q,R] impl_I ([k:⊦H] valid_eq_flip (impl_E R (valid_eq k P)) Q)❙
equivalence_I_trans: {F,G,H,I} ⊦F =bool H ⟶ ⊦G =bool I ⟶ (⊦F⇔G) ⟶ ⊦H⇔I ❘
= [F,G,H,I,P,Q,R] equivalence_I ([k:⊦H] valid_eq_flip (impl_E (equivalence_El R) (valid_eq k P)) Q) ([k:⊦I] valid_eq_flip (impl_E (equivalence_Er R) (valid_eq k Q)) P)❙
// isBinRel: tp ⟶ (tm ⟶ tm ⟶ tm) ⟶ tm ❙
// is_BinRel: {A,r,x,y} x%A ⟶ y%A ⟶ r x y % bool ⟶ ⊦isBinRel A r❙
// isReflRel: tp ⟶ (tm ⟶ tm ⟶ tm) ⟶ tm ❙
......@@ -199,63 +217,60 @@ theory DHOL : ur:?LF =
// isTransRel: tp ⟶ (tm ⟶ tm ⟶ tm) ⟶ tm ❙
// is_TransRel: {A,r,x,y,z} ⊦isBinRel A r ⟶ x%A ⟶ y%A ⟶ z%A ⟶ ⊦r x y ⟶ ⊦r y z ⟶ ⊦r x z ⟶ ⊦isTransRel A r ❙
isEqRel: tp ⟶ (tm ⟶ tm ⟶ tm) ⟶ type ❘ role Judgment ❘
= [A,r] {x,y,z,w} x%A ⟶ y%A ⟶ z%A ⟶ w%A ⟶ ⊦x =A y ⟶ ⊦y =A z ⟶ ⊦(r x x) ∧ (r x w ⇔ r w x) ∧ (r x z)❙
= [A,r] {x,y,z,w} x%A ⟶ y%A ⟶ z%A ⟶ w%A ⟶ ⊦(r x x) ∧ (r x w ⇔ r w x) ∧ ((r x y ∧ r y z) ⇒ r x z)❙
EqRel_tp: {A,r,x,y} isEqRel A r ⟶ x%A ⟶ y%A ⟶ r x y%bool ❙
EqRel_refl: {A,r,x} isEqRel A r ⟶ x%A ⟶ ⊦r x x ❘
= [A,r,x,P,Q] and_El (and_El (P x x x x Q Q Q Q)) ❙
EqRel_sym: {A,r,x,w} isEqRel A r ⟶ x%A ⟶ w%A ⟶ ⊦r x w ⇔ r w x ❘
= [A,r,x,w,P,Q,R] and_Er (and_El (P x x x w Q Q Q R)) ❙
EqRel_trans: {A,r,x,y,z} isEqRel A r ⟶ x%A ⟶ y%A ⟶ z%A ⟶ ⊦(r x y ∧ r y z) ⇒ r x z ❘
= [A,r,x,y,z,P,Q,R,S] and_Er P x y z z Q R S S ❙
quotient: tp ⟶ (tm ⟶ tm ⟶ tm) ⟶ tp❘# 1 ∕ 2 prec 5❙
quotient_form: {A,r} isEqRel A r ⟶ $A∕r ❙
quotient_I: {A,t,r} t%A ⟶ $A∕r ⟶ t%A∕r ❙
quotient_E: {A,B,s,t,r} s%A∕r ⟶ ({x} x%A ⟶ ⊦ x =(A∕r) s ⟶ (t x) % (B x)) ⟶ ({x,xˈ} x%A ⟶ xˈ%A ⟶ ⊦ x =(A∕r) s ⟶ ⊦ xˈ =(A∕r) s ⟶ ⊦ (t x) =(B x) (t xˈ)) ⟶ (t s) % (B s) ❙
quotient_E: {A,B,s,t,r} s%A∕r ⟶ ({x} x%A ⟶ ⊦x =(A∕r) s ⟶ (t x) % (B x)) ⟶ ({x,xˈ} x%A ⟶ xˈ%A ⟶ ⊦x =(A∕r) s ⟶ ⊦xˈ =(A∕r) s ⟶ ⊦(t x) =(B x) (t xˈ)) ⟶ (t s) % (B s) ❙
quotient_eq: {A,s,t,r} s%A ⟶ t%A ⟶ isEqRel A r ⟶ ⊦(s =(A∕r) t) =bool (r s t)❙
quotient_E_quick: {A,B,s,t,r} s%A∕r ⟶ ({x} x%A ⟶ (t x) % (B x)) ⟶ ({x,xˈ} x%A ⟶ xˈ%A ⟶ ⊦ (t x) =(B x) (t xˈ)) ⟶ (t s) % (B s) ❘
quotient_E_quick: {A,B,s,t,r} s%A∕r ⟶ ({x} x%A ⟶ (t x) % (B x)) ⟶ ({x,xˈ} x%A ⟶ xˈ%A ⟶ ⊦ (t x) =(B x) (t xˈ)) ⟶ (t s) % (B s) ❘
= [A,B,s,t,r,P,Q,R] quotient_E P ([x, u: x%A, v: ⊦ x =(A∕r) s] Q x u) ([x, xˈ, u: x%A, v: xˈ%A, k: ⊦ x =(A∕r) s, l: ⊦ xˈ =(A∕r) s] R x xˈ u v) ❙
refine_eq_pres_help: {A,p,s,t} s%A ⟶ ⊦s =A t ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦((λ A [x] p x) @ s) =bool ((λ A [x] p x) @ t) ❘
= [A,p,s,t,P,Q,R] (app_eq (eq_refl (lam_tp A A ([y] bool) ([y] p y) eqtp_wf R)) Q)❙
refine_eq_pres_help2: {A,p,s} s%A ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ ⊦((λ A [x] p x) @ s) ❘
= [A,p,s,P,Q,R] valid_eq R (lam_beta ([k,l:k%A] app_tp (lam_tp eqtp_wf Q) l) P)❙
refine_eq_pres_help3: {A,p,s,t} s%A ⟶ ⊦s =A t ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ ⊦((λ A [x] p x) @ t) ❘
= [A,p,s,t,P,Q,R,S] valid_eq_flip (refine_eq_pres_help2 P R S) (refine_eq_pres_help P Q R)❙
refine_eq_pres_help4: {A,p,s,t} s%A ⟶ t%A ⟶ ⊦s =A t ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ ⊦p t❘
= [A,p,s,t,P,Q,R,S,T] valid_eq_flip (refine_eq_pres_help3 P R S T) (lam_beta ([k,l:k%A] app_tp (lam_tp eqtp_wf S) l) Q)❙
pred_eq: {A,p,s,t} s%A ⟶ t%A ⟶ ⊦s =A t ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ t%(A|p)❘
= [A,p,s,t,P,Q,R,S,T] refine_I Q (refine_eq_pres_help4 P Q R S T)❙
refine_eq_pres_help6: {A,p,s} s%A ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ s%(A|p)❘
= [A,p,s,P,Q,R] refine_I P R❙
app_sub_eq_help: {A,B,f,t,tˈ} t%A ⟶ tˈ%A ⟶ ⊦t =A tˈ ⟶ ({u} u%A ⟶ (f u) % (B u)) ⟶ ⊦ (f t) =(B t) ((λ A [x] f x)@tˈ)❘
= [A,B,f,t,tˈ,P,Q,R,S] eq_trans (S t P) (app_tp (lam_tp eqtp_refl S) P) (wftm_eq (app_tp (lam_tp eqtp_refl S) Q) (dep_type_ext Q P eq_sym R)) (eq_sym (lam_beta ([k,l:k%A] app_tp A B (λ A [x] f x) k (lam_tp eqtp_refl S) l) P)) (app_eq (eq_refl lam_tp eqtp_refl S) R) ❙
app_sub_eq_help2: {A,B,f,t,tˈ} t%A ⟶ tˈ%A ⟶ ⊦t =A tˈ ⟶ ({u} u%A ⟶ (f u) % (B u)) ⟶ ⊦ (f tˈ) =(B tˈ) ((λ A [x] f x)@tˈ)❘
= [A,B,f,t,tˈ,P,Q,R,S] (eq_sym (lam_beta ([k,l:k%A] app_tp A B (λ A [x] f x) k (lam_tp eqtp_refl S) l) Q)) ❙
app_sub_eq: {A,B,f,t,tˈ} t%A ⟶ tˈ%A ⟶ ⊦t =A tˈ⟶ ({u} u%A ⟶ (f u) % (B t)) ⟶ ⊦(f t) =(B t) (f tˈ)❘
= [A,B,f,t,tˈ,P,Q,R,S] eq_trans (S t P) (app_tp (lam_tp eqtp_refl S) Q) (S tˈ Q) (app_sub_eq_help P Q R S) (eq_sym (app_sub_eq_help2 P Q R S))❙
EqRel_subs: {A,r,x,y,z,w} ({s,t} s%A ⟶ t%A ⟶ (r s t)%bool) ⟶ x%A ⟶ y%A ⟶ z%A ⟶ w%A ⟶ ⊦x =A z ⟶ ⊦y =A w ⟶ ⊦(r x y) =bool (r z w) ❘
= [A,r,x,y,z,w,P,Q,R,S,T,U,V] (eq_trans bool (r x y) (r x w) (r z w) (P x y Q R) (P x w Q T) (P z w S T) (app_sub_eq A ([m] bool) ([m] r x m) y w R T V ([t,k:t%A] P x t Q k)) (app_sub_eq A ([m] bool) ([m] r m w) x z Q S U ([t,k:t%A] P t w k T)))❙
t_sat_pred: {A,p,s,t} s%A ⟶ t%A ⟶ ⊦s =A t ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ t%(A|p)❘
= [A,p,s,t,P,Q,R,S,T] refine_I Q valid_eq_flip T (app_sub_eq A ([x] bool) p s t P Q R S)❙
singleton_sub: {A,p,s} s%A ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ (A|([x] x =A s)) < (A|p)❘
= [A,p,s,P,Q,R] [t:tm, k:t%(A|([x] x =A s))] refine_I (refine_E1 k) (refine_eq_pres_help4 P (refine_E1 k) (eq_sym (refine_E2 k)) Q R)❙
dep_pred_s: {A,s,p} s%A ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ ({t} t%A ⟶ ((p t ∧ (t =(A|([x] p x)) s))) %bool) ❘
= [A,s,p,P,Q,R] [t,k:t%A] and_tp (Q t k) ([l:⊦p t] eq_tp (refine_I A ([x] p x) t k l) (refine_I A ([x] p x) s P R)) ❙
dep_pred_s_sat_s: {A,s,p} s%A ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ ⊦ ((p s ∧ (s =(A|([x] p x)) s))) ❘
= [A,s,p,P,Q,R] and_I R (eq_refl (refine_I A ([x] p x) s P R)) ❙
dep_pred_s_sat_t: {A,s,t,p} s%A ⟶ t%A ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ ⊦s =A t ⟶ ⊦ (((p t) ∧ (t =(A|([x] p x)) s))) ❘
= [A,s,t,p,P,Q,R,S,T] refine_E2 (pred_eq P Q T ([x,k:x%A] dep_pred_s P R S x k) (dep_pred_s_sat_s P R S)) ❙
= [A,p,s,P,Q,R] [t:tm, k:t%(A|([x] x =A s))] refine_I (refine_E1 k)
valid_eq_flip R (app_sub_eq A ([x] bool) p s t P (refine_E1 k) (eq_sym (refine_E2 k)) Q)❙
dep_conj_pred_eq_s: {A,s,p} s%A ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ ({t} t%A ⟶ ((p t ∧ (t =(A|([x] p x)) s))) %bool) ❘
= [A,s,p,P,Q,R] [t,k:t%A] and_tp (Q t k) ([l:⊦p t] eq_tp (refine_I A ([x] p x) t k l) (refine_I A ([x] p x) s P R)) ❙
t_sat_dep_conj_pred_eq_s: {A,s,t,p} s%A ⟶ t%A ⟶ ⊦s =A t ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ ⊦ (((p t) ∧ (t =(A|([x] p x)) s))) ❘
= [A,s,t,p,P,Q,R,S,T] refine_E2 (t_sat_pred P Q R ([x,k:x%A] dep_conj_pred_eq_s P S T x k) and_I T (eq_refl (refine_I A ([x] p x) s P T))) ❙
refine_eq_pres: {A,s,t,p} s%A ⟶ t%A ⟶ ⊦s =A t ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ ⊦s =(A|p) t ❘
= [A,s,t,p,P,Q,R,S,T] (eq_sym and_Er dep_pred_s_sat_t P Q S T R) ❙
= [A,s,t,p,P,Q,R,S,T] (eq_sym and_Er t_sat_dep_conj_pred_eq_s P Q R S T) ❙
refine_eq_pres_rev: {A,s,t,p} s%A ⟶ t%A ⟶ ⊦t =A s ⟶ ({x} x%A ⟶ p x % bool) ⟶ ⊦p s ⟶ ⊦t =(A|p) s ❘
= [A,s,t,p,P,Q,R,S,T] eq_sym refine_eq_pres P Q (eq_sym R) S T ❙
app_sub_eq_help: {A,B,f,t,tˈ} ({u} u%A ⟶ (f u) % B) ⟶ ⊦t =A tˈ ⟶ t%A ⟶ tˈ%A ⟶ ⊦ (f t) =B ((λ A [x] f x)@tˈ)❘
= [A,B,f,t,tˈ,P,Q,R,S] prop_trans (P t R) (app_tp (lam_tp eqtp_wf P) R) (app_tp (lam_tp eqtp_wf P) S) (eq_sym (lam_beta ([k,l:k%A] app_tp A ([y] B) (λ A [x] f x) k (lam_tp eqtp_wf P) l) R)) (app_eq (eq_refl lam_tp eqtp_wf P) Q) ❙
app_sub_eq_help2: {A,B,f,t,tˈ} ({u} u%A ⟶ (f u) % B) ⟶ ⊦t =A tˈ ⟶ t%A ⟶ tˈ%A ⟶ ⊦ (f tˈ) =B ((λ A [x] f x)@tˈ)❘
= [A,B,f,t,tˈ,P,Q,R,S] (eq_sym (lam_beta ([k,l:k%A] app_tp A ([y] B) (λ A [x] f x) k (lam_tp eqtp_wf P) l) S)) ❙
app_sub_eq: {A,B,f,t,tˈ} ({u} u%A ⟶ (f u) % B) ⟶ ⊦t =A tˈ ⟶ t%A ⟶ tˈ%A ⟶ ⊦(f t) =B (f tˈ)❘
= [A,B,f,t,tˈ,P,Q,R,S] prop_trans (P t R) (app_tp (lam_tp eqtp_wf P) S) (P tˈ S) (app_sub_eq_help P Q R S) (eq_sym (app_sub_eq_help2 P Q R S))❙
eq_conservation_up: {A,B,x,y} x%A ⟶ y%A ⟶ A<B ⟶ ⊦x =A y ⟶ ⊦x =B y ❘
= [A,B,x,y,P,Q,R,S] app_sub_eq ([u,v:u%A] R u v) S P Q
= [A,B,x,y,P,Q,R,S] app_sub_eq A ([x] B) ([x] x) x y P Q S ([u,v:u%A] R u v)❙
func_trans_quo: {A,r,x,y,s} $A∕r ⟶ s%A∕r ⟶ x%A ⟶ y%A ⟶ ⊦x =(A∕r) s ⟶ ⊦y =(A∕r) s ⟶ ⊦x =(A∕r) y ❘
= [A,r,x,y,s,P,Q,R,S,T,U] prop_trans (quotient_I R P) Q (quotient_I S P) T eq_sym U ❙
= [A,r,x,y,s,P,Q,R,S,T,U] eq_trans (quotient_I R P) Q (quotient_I S P) T eq_sym U ❙
func_in_quo: {A,B,f,r} $A∕r ⟶ ({x} x%A ⟶ (f x) % B) ⟶ ({x,y} x%A ⟶ y%A ⟶ ⊦x =(A∕r) y ⟶ ⊦(f x) =B (f y)) ⟶ ({x} x%A∕r ⟶ (f x)%B) ❘
= [A,B,f,r,P,Q,R] ([s, k:s%A∕r] (quotient_E k ([x, l:x%A, m: ⊦x =(A∕r) s] Q x l) ([x, y, l:x%A, m:y%A, n: ⊦x =(A∕r) s, o: ⊦y =(A∕r) s] R x y l m (func_trans_quo P k l m n o)))) ❙
// two_ary_func_in_quo: {A,B,f,r} $A∕r ⟶ ({x} x%A ⟶ ({y} y%A ⟶ (f x y) % B)) ⟶ ({x} x%A ⟶ y%A ⟶ ⊦x =(A∕r) y ⟶ ⊦(f x) =B (f y)) ⟶ ({x} x%A∕r ⟶ (f x)%B) ❙
// = [A,B,f,r,P,Q,R] ([s, k:s%A∕r] (quotient_E k ([x, l:x%A, m: ⊦x =(A∕r) s] Q x l) ([x, y, l:x%A, m:y%A, n: ⊦x =(A∕r) s, o: ⊦y =(A∕r) s] R x y l m (func_trans_quo P k l m n o)))) ❙
true_props: {F} F%(bool|[x] x =bool true) ⟶ ⊦F =bool true❘
= [F,P] refine_E2 P ❙
props_in_true: {F} F%(bool|[x] x =bool true) ⟶ ⊦F ❘
= [F,P] valid_eq trueI (refine_E2 P)❙
true_props_at_true: {F} F%(bool|[x] x =bool true) ⟶ ⊦F =(bool|[x] x =bool true) true ❘
......@@ -263,7 +278,10 @@ theory DHOL : ur:?LF =
props_in_true2: {F} F%bool ⟶ ⊦F ⟶ F%(bool|[x] x =bool true) ❘
= [F,P,Q] refine_I P (prop_ext F true ([k:⊦F] trueI) ([l:⊦true] Q))❙
both_true_equals: {F,G} F%bool ⟶ G%bool ⟶ ⊦F ⟶ ⊦G ⟶ ⊦F =(bool|[x] x =bool true) G ❘
= [F,G,P,Q,R,S] prop_trans (props_in_true2 F P R) (props_in_true2 true true_tp trueI) (props_in_true2 G Q S) (true_props_at_true (props_in_true2 F P R)) (eq_sym (true_props_at_true (props_in_true2 G Q S)))❙
= [F,G,P,Q,R,S] eq_trans (props_in_true2 F P R) (props_in_true2 true true_tp trueI) (props_in_true2 G Q S) (true_props_at_true (props_in_true2 F P R)) (eq_sym (true_props_at_true (props_in_true2 G Q S)))❙
both_true_equalsv: {F,G} F%(bool|[x] x =bool true) ⟶ G%(bool|[x] x =bool true) ⟶ ⊦F =(bool|[x] x =bool true) G ❘
= [F,G,P,Q] both_true_equals (refine_E1 P) (refine_E1 Q) (props_in_true P) (props_in_true Q)❙
in_class_bool: {A,r} $A∕r ⟶ ({x} x%A ⟶ (∃ A [y] y=(A∕r) x)%bool) ❘
= [A,r,P] [x,k:x%A] (exists_tp ([y,l:y%A] (eq_tp (A∕r) y x (quotient_I A y r l P) (quotient_I A x r k P))))❙
......@@ -279,26 +297,215 @@ theory DHOL : ur:?LF =
prop_quo_true: {A,r,s,p} $A∕r ⟶ s%A∕r ⟶ ({x} x%A ⟶ p x%(bool|[x] x =bool true)) ⟶ (p s)%(bool|[x] x =bool true) ❘
= [A,r,s,p,P,Q,R] (quotient_E_quick Q ([z,k:z%A] R z k) ([z,zˈ,k:z%A,l:zˈ%A] both_true_equals (refine_E1 R z k) (refine_E1 R zˈ l) (props_in_true R z k) (props_in_true R zˈ l))) ❙
// quotient_EqRelQuo: {A,s,t,r} s%A ⟶ t%A∕r ⟶ isEqRel A r ⟶ (r s t)%bool❙
quotient_triv: {A} isEqRel A ([x,y] x =A y) ❘
= [A] [x,y,z,w,k:x%A,l:y%A,m:z%A,n:w%A,o:⊦x =A y,p:⊦y =A z] and_I (and_I (eq_refl k) (equivalence_I (impl_I ([u:⊦x =A w] eq_sym u)) (impl_I ([u:⊦w =A x] eq_sym u)))) (prop_trans k l m o p)❙
quotient_eqv: {A,s,t,r} s%A∕r ⟶ t%A∕r ⟶ isEqRel A r ⟶ ⊦(s =(A∕r) t) =bool (r s t) ❘
= [A,s,t,r,P,Q,R] _ ❙
// func_trans_quo: {A,r,x,y,s} $A∕r ⟶ s%A∕r ⟶ x%A ⟶ y%A ⟶ ⊦x =(A∕r) s ⟶ ⊦y =(A∕r) s ⟶ ⊦x =(A∕r) y ❙
// quotient_sub_help: {A,Aˈ,r,rˈ} A<Aˈ ⟶ isEqRel A r ⟶ isEqRel Aˈ rˈ ⟶ ({x,y} x%A ⟶ y%A ⟶ ⊦x =(A∕r) y ⟶ ⊦x =(Aˈ∕rˈ) y) ⟶ isEqRel A rˈ ❙
// = [A,Aˈ,r,rˈ,P,Q,R,S] [x,y,z,w,k:x%A,l:y%A,m:z%A,n:w%A] quotient_E ([x,l:x%A,m:⊦x=(A∕r) s] quotient_I (P x l) (quotient_form R)) ([x,xˈ,l:x%A,m:xˈ%A,n:⊦x=(A∕r) s,o:⊦xˈ=(A∕r) s] func_trans_quo (quotient_form Q) k l m (S x xˈ l m) )❙
quotient_sub: {A,Aˈ,r,rˈ} A<Aˈ ⟶ isEqRel A r ⟶ isEqRel Aˈ rˈ ⟶ ({x,y} x%A ⟶ y%A ⟶ ⊦r x y ⟶ ⊦rˈ x y) ⟶ A∕r < Aˈ∕rˈ ❙
// = [A,Aˈ,r,rˈ,P,Q,R,S] [s,k:s%A∕r] quotient_E ([x,l:x%A,m:⊦x=(A∕r) s] quotient_I (P x l) (quotient_form R)) ([x,xˈ,l:x%A,m:xˈ%A,n:⊦x=(A∕r) s,o:⊦xˈ=(A∕r) s] func_trans_quo (quotient_form Q) k l m (S x xˈ l m) )❙
= [A] [x,y,z,w,k:x%A,l:y%A,m:z%A,n:w%A] and_I (and_I (eq_refl k) (equivalence_I ([u:⊦x =A w] eq_sym u) ([u:⊦w =A x] eq_sym u))) (impl_I ([u:⊦(x =A y)∧(y =A z)] (eq_trans k l m (and_El u) (and_Er u))))❙
quotient_sub: {A,Aˈ,r,rˈ} A<Aˈ ⟶ isEqRel A r ⟶ isEqRel Aˈ rˈ ⟶ ({x,y} x%A ⟶ y%A ⟶ ⊦r x y ⟶ ⊦rˈ x y) ⟶ A∕r < Aˈ∕rˈ ❘
= [A,Aˈ,r,rˈ,P,Q,R,S] [s,k:s%A∕r] quotient_E k ([x, l:x%A, m:⊦x=(A∕r) s] quotient_I Aˈ x rˈ (P x l) (quotient_form R)) ([x, xˈ, l:x%A, m:xˈ%A, n:⊦x=(A∕r) s, o:⊦xˈ=(A∕r) s] valid_eq (S x xˈ l m (valid_eq_flip (func_trans_quo A r x xˈ s (quotient_form Q) k l m n o) (quotient_eq l m Q))) (quotient_eq Aˈ x xˈ rˈ (P x l) (P xˈ m) R))❙
quotient_subtp: {A,r} $A∕r ⟶ A < A∕r ❘
= [A,r,P] [x, s: x%A] (quotient_I A x r) s P ❙
two_ary_func_on_quo_help: {A,s,t,r,f} s%A∕r ⟶ t%A ⟶ ({x,y} x%A ⟶ y%A ⟶ (f x y)%(bool|[x] x =bool true)) ⟶ (f s t)%(bool|[x] x =bool true) ❘
= [A,s,t,r,f,P,Q,R] quotient_E_quick P ([k,l:k%A] R k t l Q) ([k,kˈ,l:k%A,lˈ:kˈ%A] both_true_equalsv (R k t l Q) (R kˈ t lˈ Q))❙
two_ary_func_on_quo_help2: {A,s,t,r,f} s%A∕r ⟶ t%A∕r ⟶ ({x,y} x%A∕r ⟶ y%A ⟶ (f x y)%(bool|[x] x =bool true)) ⟶ (f s t)%(bool|[x] x =bool true) ❘
= [A,s,t,r,f,P,Q,R] quotient_E_quick Q ([k,l:k%A] R s k P l) ([k,l, m:k%A,n:l%A] both_true_equalsv (R s k P m) (R s l P n))❙
two_ary_func_on_quo: {A,s,t,r,f} s%A∕r ⟶ t%A∕r ⟶ ({x,y} x%A ⟶ y%A ⟶ (f x y)%(bool|[x] x =bool true)) ⟶ (f s t)%(bool|[x] x =bool true) ❘
= [A,s,t,r,f,P,Q,R] two_ary_func_on_quo_help2 P Q ([k,l, m:k%A∕r,n:l%A] (two_ary_func_on_quo_help m n R)) ❙
quotient_eqv: {A,s,t,r} s%A∕r ⟶ t%A∕r ⟶ isEqRel A r ⟶ ({x,y} x%A ⟶ y%A ⟶ (r x y)%bool) ⟶ ((s =(A∕r) t) =bool (r s t))%(bool|[x] x =bool true) ❘
= [A,s,t,r,P,Q,R,S] two_ary_func_on_quo P Q ([k,l, m:k%A,n:l%A] props_in_true2 (eq_tp (eq_tp (quotient_I m (quotient_form R)) (quotient_I n (quotient_form R))) (S k l m n)) (quotient_eq m n R)) ❙
quotient_eq_rel: {A,Aˈ,r,rˈ} A≡Aˈ ⟶ isEqRel A r ⟶ isEqRel Aˈ rˈ ⟶ ({x,y} x%A ⟶ y%A ⟶ ⊦(r x y) =bool (rˈ x y)) ⟶ A∕r ≡ Aˈ∕rˈ ❘
= [A,Aˈ,r,rˈ,P,Q,R,S] subtp_antisym (quotient_sub (eqtp_subtp P) Q R ([k,l, m:k%A,n:l%A, o:⊦r k l] valid_eq_flip o (S k l m n))) (quotient_sub (eqtp_subtp (eqtp_sym P)) R Q ([k,l, m:k%Aˈ,n:l%Aˈ, o:⊦rˈ k l] valid_eq o (S k l (wftm_eq m (eqtp_sym P)) (wftm_eq n (eqtp_sym P))))) ❙
quotient_eq_triv_quotient: {A} A ≡ A∕([x,y] x=A y) ❘
= [A] subtp_antisym (quotient_subtp (quotient_form quotient_triv)) ([s,k:s%A∕([x,y] x=A y)] quotient_E k ([kˈ,l:kˈ%A,m:⊦kˈ =(A∕([x,y] x=A y)) s] l) ([kˈ,lˈ, m:kˈ%A,n:lˈ%A, o:⊦kˈ =(A∕([x,y] x=A y)) s,p:⊦lˈ =(A∕([x,y] x=A y)) s] valid_eq_flip (eq_trans (quotient_I m (quotient_form quotient_triv)) k (quotient_I n (quotient_form quotient_triv)) o (eq_sym p)) quotient_eq m n quotient_triv)) ❙
quotient_triv_eq: {A,r} isEqRel A r ⟶ isEqRel A ([x,y] x=(A∕r) y) ❘
= [A,r,P] [x,y,z,w, k:x%A,l:y%A,m:z%A,n:w%A] and_I (and_I (eq_refl quotient_I k (quotient_form P)) (equivalence_I ([f:⊦x=(A∕r) w] eq_sym f) ([f:⊦w=(A∕r) x] eq_sym f))) (impl_I ([f:⊦(x=(A∕r) y ∧ y=(A∕r) z)] eq_trans (quotient_I k quotient_form P) (quotient_I l quotient_form P) (quotient_I m quotient_form P) (and_El f) (and_Er f))) ❙
quotient_triv_eq_eq: {A,r} isEqRel A r ⟶ (A∕r) ≡ A∕([x,y] x=(A∕r) y) ❘
= [A,r,P] quotient_eq_rel eqtp_refl P (quotient_triv_eq P) ([x,y, k:x%A,l:y%A] eq_sym quotient_eq k l P ) ❙
EqRel_on_quo: {A,r} isEqRel A r ⟶ isEqRel (A∕r) r ❘
= [A,r,P] [x,y,z,w, k:x%A∕r,l:y%A∕r,m:z%A∕r,n:w%A∕r] and_I (and_I (valid_eq_flip (eq_refl k) (props_in_true (quotient_eqv A x x r k k P ([s,t, f:s%A,g:t%A] EqRel_tp P f g)))) (equivalence_I ([f:⊦r x w] (valid_eq_flip (eq_sym (valid_eq f (props_in_true (quotient_eqv A x w r k n P ([s,t, g:s%A,h:t%A] EqRel_tp P g h))))) (props_in_true (quotient_eqv A w x r n k P ([s,t, g:s%A,h:t%A] EqRel_tp P g h))))) ([f:⊦r w x] (valid_eq_flip (eq_sym (valid_eq f (props_in_true (quotient_eqv A w x r n k P ([s,t, g:s%A,h:t%A] EqRel_tp P g h))))) (props_in_true (quotient_eqv A x w r k n P ([s,t, g:s%A,h:t%A] EqRel_tp P g h))))))) (impl_I ([f:⊦(r x y)∧(r y z)] valid_eq_flip (eq_trans k l m (valid_eq (and_El f) (props_in_true (quotient_eqv A x y r k l P ([s,t, g:s%A,h:t%A] EqRel_tp P g h)))) (valid_eq (and_Er f) (props_in_true (quotient_eqv A y z r l m P ([s,t, g:s%A,h:t%A] EqRel_tp P g h))))) (props_in_true (quotient_eqv A x z r k m P ([s,t, g:s%A,h:t%A] EqRel_tp P g h))))) ❙
quotient_idempotent: {A,r} isEqRel A r ⟶ ((A∕r)∕r) ≡ (A∕r) ❘
= [A,r,P] subtp_antisym ([s,k:s%(A∕r)∕r] quotient_E k ([x,l:x%A∕r, m:⊦x=((A∕r)∕r)s] l) ([x,y, l:x%A∕r,m:y%A∕r, n:⊦x=((A∕r)∕r)s,o:⊦y=((A∕r)∕r)s] valid_eq (valid_eq_flip (eq_trans (quotient_I (A∕r) x r l (quotient_form (EqRel_on_quo P))) k (quotient_I (A∕r) y r m (quotient_form (EqRel_on_quo P))) n (eq_sym o)) (quotient_eq (A∕r) x y r l m (EqRel_on_quo P))) (props_in_true (quotient_eqv l m P ([z,w, g:z%A,h:w%A] EqRel_tp P g h))))) (quotient_subtp quotient_form EqRel_on_quo P) ❙
repeated_ref: {A,p,pˈ} (A|p)|pˈ ≡ A|([x] p x ∧ pˈ x) ❘
= [A,p,pˈ] subtp_antisym ([k,l:k%(A|p)|pˈ] refine_I (refine_E1 refine_E1 l) (and_I (refine_E2 refine_E1 l) (refine_E2 l))) ([k,l:k%A|([x] p x ∧ pˈ x)] refine_I (refine_I (refine_E1 l) (and_El refine_E2 l)) (and_Er refine_E2 l))❙
repeated_quo_help: {A,r,rˈ} isEqRel A r ⟶ isEqRel (A∕r) rˈ ⟶ isEqRel A rˈ ❘
= [A,r,rˈ,P,Q] [x,y,z,w, k:x%A,l:y%A,m:z%A,n:w%A] and_I (and_I (EqRel_refl Q (quotient_I k (quotient_form P))) (EqRel_sym Q (quotient_I k (quotient_form P)) (quotient_I n (quotient_form P)))) (EqRel_trans Q (quotient_I k (quotient_form P)) (quotient_I l (quotient_form P)) (quotient_I m (quotient_form P)))❙
repeated_quo_help2: {A,r,rˈ} isEqRel A r ⟶ isEqRel (A∕r) rˈ ⟶ A∕rˈ < (A∕r)∕rˈ ❘
= [A,r,rˈ,P,Q] quotient_sub A (A∕r) rˈ rˈ (quotient_subtp quotient_form P) (repeated_quo_help P Q) Q ([x,y, kˈ:x%A,lˈ:y%A, m:⊦rˈ x y] m )❙
repeated_quo_help3: {A,r,rˈ,x,y} isEqRel A r ⟶ isEqRel (A∕r) rˈ ⟶ x%A ⟶ y%A ⟶ ⊦r x y ⟶ ⊦rˈ x y ❘
= [A,r,rˈ,x,y,P,Q,R,S,T] valid_eq_flip (EqRel_refl (repeated_quo_help A r rˈ P Q) R) (app_sub_eq (A∕r) ([z] bool) ([z] rˈ x z) x y (quotient_I R quotient_form P) (quotient_I S quotient_form P) (valid_eq T (quotient_eq R S P)) ([t,u:t%A∕r] EqRel_tp Q (quotient_I R quotient_form P) u)) ❙
repeated_quo_help4: {A,r,rˈ} isEqRel A r ⟶ isEqRel (A∕r) rˈ ⟶ A∕r < A∕rˈ ❘
= [A,r,rˈ,P,Q] quotient_sub (eqtp_subtp eqtp_refl) P (repeated_quo_help P Q) ([x,y, k:x%A,l:y%A, m:⊦r x y] repeated_quo_help3 P Q k l m)❙
repeated_quo_help5: {A,r,rˈ} isEqRel A r ⟶ isEqRel (A∕r) rˈ ⟶ (A∕r)∕rˈ < (A∕rˈ)∕rˈ ❘
= [A,r,rˈ,P,Q] (quotient_sub (A∕r) (A∕rˈ) rˈ rˈ (repeated_quo_help4 A r rˈ P Q) Q (EqRel_on_quo (repeated_quo_help A r rˈ P Q)) ([x,y, k:x%A∕r,l:y%A∕r, m:⊦rˈ x y] m)) ❙
repeated_quo: {A,r,rˈ} isEqRel A r ⟶ isEqRel (A∕r) rˈ ⟶ (A∕r)∕rˈ ≡ A∕rˈ ❘
= [A,r,rˈ,P,Q] subtp_antisym (subtp_trans (repeated_quo_help5 A r rˈ P Q) (eqtp_subtp (quotient_idempotent (repeated_quo_help A r rˈ P Q)))) (repeated_quo_help2 P Q) ❙
quo_in_ref_subtp: {A,r,p} isEqRel A r ⟶ ({x} x%A ⟶ p x%bool) ⟶ isEqRel (A|p) r ❘
= [A,r,p,P,Q] [x,y,z,w, k:x%A|p,l:y%A|p,m:z%A|p,n:w%A|p] and_I (and_I (EqRel_refl P (refine_E1 k)) (EqRel_sym P (refine_E1 k) (refine_E1 n))) (EqRel_trans P (refine_E1 k) (refine_E1 l) (refine_E1 m))❙
repeated_ref_quo_help: {A,r,p} isEqRel A r ⟶ ({x} x%A∕r ⟶ p x%bool) ⟶ (A∕r)|p < (A|p)∕r ❘
= [A,r,p,P,Q] ([x,k:x%(A∕r)|p] quotient_E (refine_E1 k)
([y,l:y%A, m:⊦y=(A∕r)x] quotient_I (A|p) y r (refine_I A p y l (valid_eq (refine_E2 k) (app_sub_eq (A∕r) ([x] bool) p y x (quotient_I A y r l (quotient_form P)) (refine_E1 k) m ([u,v:u%A∕r] Q u v)))) (quotient_form (quo_in_ref_subtp P ([u,v:u%A] Q u quotient_I v quotient_form P))))
([y,z, l:y%A,m:z%A, n:⊦y=(A∕r)x,o:⊦z=(A∕r)x] valid_eq
(
valid_eq_flip
(eq_trans (A∕r) y x z (quotient_I l quotient_form P) (refine_E1 k) (quotient_I m quotient_form P) n (eq_sym o))
(quotient_eq A y z r l m P)
)(
quotient_eq (A|p) y z r
(
refine_I A p y l (valid_eq (refine_E2 k)
(
app_sub_eq (A∕r) ([x] bool) p y x (quotient_I A y r l (quotient_form P)) (refine_E1 k)
n ([u,v:u%A∕r] Q u v)))
)(
refine_I A p z m (valid_eq (refine_E2 k)
(
app_sub_eq (A∕r) ([x] bool) p z x (quotient_I A z r m (quotient_form P)) (refine_E1 k)
o ([u,v:u%A∕r] Q u v))))
(quo_in_ref_subtp A r p P ([u,v:u%A] Q u quotient_I v quotient_form P)))))❙
repeated_ref_quo_help2: {A,r,p} isEqRel A r ⟶ ({x} x%A∕r ⟶ p x%bool) ⟶ (A|p)∕r < (A∕r)|p ❘
= [A,r,p,P,Q] [x,k:x%(A|p)∕r] quotient_E k ([y,l:y%A|p, m:⊦y=((A|p)∕r)x] refine_I (quotient_I (refine_E1 l) (quotient_form P)) (refine_E2 l))
([y,z, l:y%A|p,m:z%A|p, n:⊦y=((A|p)∕r)x,o:⊦z=((A|p)∕r)x]
refine_eq_pres
(quotient_I A y r (refine_E1 l) (quotient_form P))
(quotient_I A z r (refine_E1 m) (quotient_form P))
(valid_eq (y=(A∕r)z) (r y z)
(valid_eq_flip (y=((A|p)∕r)z) (r y z)
(
eq_trans ((A|p)∕r) y x z
(quotient_I (A|p) y r l quotient_form (quo_in_ref_subtp A r p P ([u,v:u%A] Q u quotient_I v quotient_form P)))
k
(quotient_I (A|p) z r m quotient_form (quo_in_ref_subtp A r p P ([u,v:u%A] Q u quotient_I v quotient_form P)))
n (eq_sym o)
)
(
quotient_eq (A|p) y z r l m (quo_in_ref_subtp A r p P ([u,v:u%A] Q u quotient_I v quotient_form P))
))
(quotient_eq A y z r (refine_E1 l) (refine_E1 m) P)
)
(Q)
(refine_E2 l))
repeated_ref_quo: {A,r,p} isEqRel A r ⟶ ({x} x%A∕r ⟶ p x%bool) ⟶ (A∕r)|p ≡ (A|p)∕r ❘
= [A,r,p,P,Q] subtp_antisym (repeated_ref_quo_help P Q) (repeated_ref_quo_help2 P Q)❙
refined_codomain: {A,B,p} (Π A [x] ((B x)|p)) ≡ (Π A [x] B x)|([f] ∀ A [x] p (f@x)) ❘
= [A,B,p] subtp_antisym ([f,k:f%(Π A [x] ((B x)|p))]
refine_I
(exten_tp ([x,l:x%A] (refine_E1 (app_tp k l))))
(forall_I ([x,l:x%A] (refine_E2 (app_tp k l))))
)
([f, k:f%(Π A [x] B x)|([g] ∀ A [x] p (g@x))]
(exten_tp ([x,l:x%A] refine_I (app_tp (refine_E1 k) l)
(forall_E (refine_E2 k) l))
))
quotiented_domain: {A,B,r} isEqRel A r ⟶ (Π (A∕r) [x] B x) ≡ (Π A [x] B x)|([f] ∀ A [x] (∀ A [y] (r x y ⇒ (f@x) =(B x) (f@y)))) ❘
= [A,B,r,P] subtp_antisym ([f,k:f%(Π (A∕r) [x] B x)]
refine_I
(exten_tp ([y,l:y%A] app_tp k quotient_I l quotient_form P))
(forall_I ([x,l:x%A]
forall_I ([y,m:y%A]
impl_I [n:⊦r x y] (app_eq (eq_refl k) (valid_eq n (quotient_eq l m P)))))))
([f,k:f%(Π A [x] B x)|([g] ∀ A [x] (∀ A [y] (r x y ⇒ (g@x) =(B x) (g@y))))] exten_tp
([s,l:s%A∕r] quotient_E l
([x,m:x%A,n:⊦x=(A∕r)s] app_tp (refine_E1 k) m)
([x,y, m:x%A,n:y%A, o:⊦x=(A∕r)s,p:⊦y=(A∕r)s]
impl_E
(forall_E (forall_E (refine_E2 k) m) n)
(valid_eq_flip
(eq_trans (quotient_I m (quotient_form P)) l (quotient_I n (quotient_form P)) o (eq_sym p))
(quotient_eq m n P)))))
quo_codomain_EqRel: {A,B,r,x} x%A ⟶ isEqRel (B x) r ⟶ isEqRel ((B x)∕r) r ❘
= [A,B,r,x,P,Q] EqRel_on_quo Q ❙
quo_codomain_EqRel2: {A,B,r} ({x} x%A ⟶ isEqRel (B x) r) ⟶ isEqRel (Π A ([x] (B x)∕r)) ([f,g] ∀ A [x] (r (f@x) (g@x)))❘
= [A,B,r,P] [f,g,h,i, k:f%(Π A ([x] (B x)∕r)),l:g%(Π A ([x] (B x)∕r)),m:h%(Π A ([x] (B x)∕r)),n:i%(Π A ([x] (B x)∕r))]
(and_I (and_I
(
forall_I ([b,c:b%A] EqRel_refl (quo_codomain_EqRel c (P b c)) (app_tp k c))
)
(
equivalence_I
([a:⊦∀ A [x] (r (f@x) (i@x))]
forall_I ([b, c:b%A]
impl_E
(equivalence_El (EqRel_sym (quo_codomain_EqRel c (P b c)) (app_tp k c) (app_tp n c)))
(forall_E a c)
))
([a:⊦∀ A [x] (r (i@x) (f@x))]
forall_I ([b, c:b%A]
impl_E
(equivalence_El (EqRel_sym (quo_codomain_EqRel c (P b c)) (app_tp n c) (app_tp k c)))
(forall_E a c)
))
))
(
impl_I
([a:⊦(∀ A [x] (r (f@x) (g@x))) ∧ (∀ A [x] (r (g@x) (h@x)))]
forall_I ([b, c:b%A]
impl_E (EqRel_trans (quo_codomain_EqRel c (P b c)) (app_tp k c) (app_tp l c) (app_tp m c))
(and_I (forall_E (and_El a) c) (forall_E (and_Er a) c))
))
)
)
quotiented_codomain_ax: {A,B,r} (Π A ([x] (B x)∕r)) < (Π A [x] B x)∕([f,g] ∀ A [x] (r (f@x) (g@x))) ❙
quotiented_codomain: {A,B,r} ({x} x%A ⟶ isEqRel (B x) r) ⟶ isEqRel (Π A [x] B x) ([f,g] ∀ A [x] (r (f@x) (g@x))) ⟶ (Π A [x] B x)∕([f,g] ∀ A [x] (r (f@x) (g@x))) < (Π A ([x] (B x)∕r)) ❘
= [A,B,r,P,Q] [f,k:f%(Π A [x] B x)∕([u,v] ∀ A [x] (r (u@x) (v@x)))]
(quotient_E k
([g,l:g%(Π A [x] B x),m:⊦g=((Π A [x] B x)∕([u,v] ∀ A [x] (r (u@x) (v@x))))f]
exten_tp ([x,n:x%A] quotient_I (app_tp l n) (quotient_form P x n))
)
([g,h, l:g%(Π A [x] B x),m:h%(Π A [x] B x), n:⊦g=((Π A [x] B x)∕([u,v] ∀ A [x] (r (u@x) (v@x))))f,o:⊦h=((Π A [x] B x)∕([u,v] ∀ A [x] (r (u@x) (v@x))))f]
exten_eq ([z,p:z%A]
valid_eq
(forall_E
(
valid_eq_flip
(eq_trans (quotient_I l (quotient_form Q)) k (quotient_I m (quotient_form Q)) n (eq_sym o))
(quotient_eq l m Q)
)
p)
(quotient_eq (app_tp l p) (app_tp m p) (P z p))
))
)
refined_domain: {A,B,p} isEqRel (Π A [x] B x) ([f,g] ∀ A [x] (p x ⇒ (f@x) =(B x) (g@x))) ⟶ (Π A [x] B x)∕([f,g] ∀ A [x] (p x ⇒ (f@x) =(B x) (g@x))) < (Π (A|p) [x] B x) ❘
= [A,B,p,P] [f,k:f%((Π A [x] B x)∕([g,h] ∀ A [x] (p x ⇒ (g@x) =(B x) (h@x))))]
quotient_E k ([g,m:g%(Π A [x] B x), u:⊦g=((Π A [x] B x)∕([h,i] ∀ A [x] (p x ⇒ (h@x) =(B x) (i@x)))) f] exten_tp ([x,l:x%(A|p)] app_tp m (refine_E1 l)))
([g,h, m:g%(Π A [x] B x),n:h%(Π A [x] B x), o:⊦g=((Π A [x] B x)∕([i,j] ∀ A [x] (p x ⇒ (i@x) =(B x) (j@x)))) f,q:⊦h=((Π A [x] B x)∕([i,j] ∀ A [x] (p x ⇒ (i@x) =(B x) (j@x)))) f]
exten_eq ([x,l:x%(A|p)]
impl_E
(forall_E
(
valid_eq_flip
(eq_trans (quotient_I m (quotient_form P)) k (quotient_I n (quotient_form P))
o (eq_sym q))
(quotient_eq m n P)
)
(refine_E1 l)
)
(refine_E2 l)
))
/T Example 1❚
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment