From ee9a771a3cf2124ef65906ae75eb0ba7e2e4303b Mon Sep 17 00:00:00 2001 From: Cosimo Oliboni Date: Sun, 19 Jul 2009 21:18:32 +0000 Subject: [PATCH] freescale porting, work in progress --- .../contribs/ng_assembly/freescale/theory.ma | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/helm/software/matita/contribs/ng_assembly/freescale/theory.ma b/helm/software/matita/contribs/ng_assembly/freescale/theory.ma index ce5740bfa..228692451 100644 --- a/helm/software/matita/contribs/ng_assembly/freescale/theory.ma +++ b/helm/software/matita/contribs/ng_assembly/freescale/theory.ma @@ -31,31 +31,31 @@ include "freescale/pts.ma". ninductive True: Prop ≝ I : True. -ndefinition True_ind : ΠP:Prop.P → True → P ≝ +(*ndefinition True_ind_xx : ΠP:Prop.P → True → P ≝ λP:Prop.λp:P.λH:True. match H with [ I ⇒ p ]. -ndefinition True_rec : ΠP:Set.P → True → P ≝ +ndefinition True_rec_xx : ΠP:Set.P → True → P ≝ λP:Set.λp:P.λH:True. match H with [ I ⇒ p ]. -ndefinition True_rect : ΠP:Type.P → True → P ≝ +ndefinition True_rect_xx : ΠP:Type.P → True → P ≝ λP:Type.λp:P.λH:True. - match H with [ I ⇒ p ]. + match H with [ I ⇒ p ].*) ninductive False: Prop ≝. -ndefinition False_ind : ΠP:Prop.False → P ≝ +(*ndefinition False_ind_xx : ΠP:Prop.False → P ≝ λP:Prop.λH:False. match H in False return λH1:False.P with []. -ndefinition False_rec : ΠP:Set.False → P ≝ +ndefinition False_rec_xx : ΠP:Set.False → P ≝ λP:Set.λH:False. match H in False return λH1:False.P with []. -ndefinition False_rect : ΠP:Type.False → P ≝ +ndefinition False_rect_xx : ΠP:Type.False → P ≝ λP:Type.λH:False. - match H in False return λH1:False.P with []. + match H in False return λH1:False.P with [].*) ndefinition Not: Prop → Prop ≝ λA.(A → False). @@ -66,7 +66,8 @@ nlemma absurd : ∀A,C:Prop.A → ¬A → C. #A; #C; #H; nnormalize; #H1; - nelim (H1 H). + (* perche' non fa nelim (H1 H). ??? *) + napply (False_ind ? (H1 H)). nqed. nlemma not_to_not : ∀A,B:Prop. (A → B) → ¬B →¬A. @@ -79,17 +80,17 @@ nqed. ninductive And (A,B:Prop) : Prop ≝ conj : A → B → (And A B). -ndefinition And_ind : ΠA,B:Prop.ΠP:Prop.(A → B → P) → And A B → P ≝ +(*ndefinition And_ind_xx : ΠA,B:Prop.ΠP:Prop.(A → B → P) → And A B → P ≝ λA,B:Prop.λP:Prop.λf:A → B → P.λH:And A B. match H with [conj H1 H2 ⇒ f H1 H2 ]. -ndefinition And_rec : ΠA,B:Prop.ΠP:Set.(A → B → P) → And A B → P ≝ +ndefinition And_rec_xx : ΠA,B:Prop.ΠP:Set.(A → B → P) → And A B → P ≝ λA,B:Prop.λP:Set.λf:A → B → P.λH:And A B. match H with [conj H1 H2 ⇒ f H1 H2 ]. -ndefinition And_rect : ΠA,B:Prop.ΠP:Type.(A → B → P) → And A B → P ≝ +ndefinition And_rect_xx : ΠA,B:Prop.ΠP:Type.(A → B → P) → And A B → P ≝ λA,B:Prop.λP:Type.λf:A → B → P.λH:And A B. - match H with [conj H1 H2 ⇒ f H1 H2 ]. + match H with [conj H1 H2 ⇒ f H1 H2 ].*) interpretation "logical and" 'and x y = (And x y). @@ -111,9 +112,9 @@ ninductive Or (A,B:Prop) : Prop ≝ or_introl : A → (Or A B) | or_intror : B → (Or A B). -ndefinition Or_ind : ΠA,B:Prop.ΠP:Prop.(A → P) → (B → P) → Or A B → P ≝ +(*ndefinition Or_ind_xx : ΠA,B:Prop.ΠP:Prop.(A → P) → (B → P) → Or A B → P ≝ λA,B:Prop.λP:Prop.λf1:A → P.λf2:B → P.λH:Or A B. - match H with [ or_introl H1 ⇒ f1 H1 | or_intror H1 ⇒ f2 H1 ]. + match H with [ or_introl H1 ⇒ f1 H1 | or_intror H1 ⇒ f2 H1 ].*) interpretation "logical or" 'or x y = (Or x y). @@ -122,18 +123,18 @@ ndefinition decidable : Prop → Prop ≝ λA:Prop.A ∨ ¬A. ninductive ex (A:Type) (Q:A → Prop) : Prop ≝ ex_intro: ∀x:A.Q x → ex A Q. -ndefinition ex_ind : ΠA:Type.ΠQ:A → Prop.ΠP:Prop.(Πa:A.Q a → P) → ex A Q → P ≝ +(*ndefinition ex_ind_xx : ΠA:Type.ΠQ:A → Prop.ΠP:Prop.(Πa:A.Q a → P) → ex A Q → P ≝ λA:Type.λQ:A → Prop.λP:Prop.λf:(Πa:A.Q a → P).λH:ex A Q. - match H with [ ex_intro H1 H2 ⇒ f H1 H2 ]. + match H with [ ex_intro H1 H2 ⇒ f H1 H2 ].*) interpretation "exists" 'exists x = (ex ? x). ninductive ex2 (A:Type) (Q,R:A → Prop) : Prop ≝ ex_intro2: ∀x:A.Q x → R x → ex2 A Q R. -ndefinition ex2_ind : ΠA:Type.ΠQ,R:A → Prop.ΠP:Prop.(Πa:A.Q a → R a → P) → ex2 A Q R → P ≝ +(*ndefinition ex2_ind_xx : ΠA:Type.ΠQ,R:A → Prop.ΠP:Prop.(Πa:A.Q a → R a → P) → ex2 A Q R → P ≝ λA:Type.λQ,R:A → Prop.λP:Prop.λf:(Πa:A.Q a → R a → P).λH:ex2 A Q R. - match H with [ ex_intro2 H1 H2 H3 ⇒ f H1 H2 H3 ]. + match H with [ ex_intro2 H1 H2 H3 ⇒ f H1 H2 H3 ].*) ndefinition iff ≝ λA,B.(A -> B) ∧ (B -> A). @@ -169,17 +170,17 @@ ndefinition antisymmetric : ∀A:Type.∀R:relation A.Prop ≝ ninductive eq (A:Type) (x:A) : A → Prop ≝ refl_eq : eq A x x. -ndefinition eq_ind : ΠA:Type.Πx:A.ΠP:A → Prop.P x → Πa:A.eq A x a → P a ≝ +(*ndefinition eq_ind_xx : ΠA:Type.Πx:A.ΠP:A → Prop.P x → Πa:A.eq A x a → P a ≝ λA:Type.λx:A.λP:A → Prop.λp:P x.λa:A.λH:eq A x a. match H with [refl_eq ⇒ p ]. -ndefinition eq_rec : ΠA:Type.Πx:A.ΠP:A → Set.P x → Πa:A.eq A x a → P a ≝ +ndefinition eq_rec_xx : ΠA:Type.Πx:A.ΠP:A → Set.P x → Πa:A.eq A x a → P a ≝ λA:Type.λx:A.λP:A → Set.λp:P x.λa:A.λH:eq A x a. match H with [refl_eq ⇒ p ]. -ndefinition eq_rect : ΠA:Type.Πx:A.ΠP:A → Type.P x → Πa:A.eq A x a → P a ≝ +ndefinition eq_rect_xx : ΠA:Type.Πx:A.ΠP:A → Type.P x → Πa:A.eq A x a → P a ≝ λA:Type.λx:A.λP:A → Type.λp:P x.λa:A.λH:eq A x a. - match H with [refl_eq ⇒ p ]. + match H with [refl_eq ⇒ p ].*) interpretation "leibnitz's equality" 'eq t x y = (eq t x y). @@ -189,6 +190,9 @@ nlemma symmetric_eq: ∀A:Type. symmetric A (eq A). #A; nnormalize; #x; #y; #H; + (* rifiuta nrewrite >, nrewrite < + e la prima volta mi ha risposto con assert false, + poi con errori di tipo ??? *) nrewrite < H; napply (refl_eq ??). nqed. -- 2.39.2