From: Enrico Tassi Date: Sun, 19 Oct 2008 09:21:07 +0000 (+0000) Subject: more tests X-Git-Tag: make_still_working~4663 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=f0643b9fd4160f49c0d368855d0e3e638f2d58ca;p=helm.git more tests --- diff --git a/helm/software/matita/contribs/didactic/induction.ma b/helm/software/matita/contribs/didactic/induction.ma index bc52a8246..aa7b7aff6 100644 --- a/helm/software/matita/contribs/didactic/induction.ma +++ b/helm/software/matita/contribs/didactic/induction.ma @@ -221,14 +221,15 @@ interpretation "Semantic of Formula" 'semantics v a = (sem v a). definizione di `sem` e prima di continuare è necessario che la sistemiate. *) definition v1101 ≝ λx. - if eqb x 0 then 1 (* Atom 0 ↦ 1 *) - else if eqb x 1 then 1 (* Atom 1 ↦ 1 *) - else if eqb x 2 then 0 (* Atom 2 ↦ 0 *) - else if eqb x 3 then 1 (* Atom 3 ↦ 1 *) - else 0. (* Atom _ ↦ 0 *) + if eqb x 0 then 1 (* FAtom 0 ↦ 1 *) + else if eqb x 1 then 1 (* FAtom 1 ↦ 1 *) + else if eqb x 2 then 0 (* FAtom 2 ↦ 0 *) + else if eqb x 3 then 1 (* FAtom 3 ↦ 1 *) + else 0. (* FAtom _ ↦ 0 *) -definition esempio1 ≝ (FImpl (FAtom 3) (FOr (FAtom 2) (FAnd (FAtom 1) (FAtom 0)))). +definition esempio1 ≝ + (FImpl (FNot (FAtom 3)) (FOr (FAtom 2) (FAnd (FAtom 1) (FAtom 0)))). eval normalize on [[ esempio1 ]]_v1101. @@ -252,8 +253,6 @@ let rec subst (x:nat) (G: Formula) (F: Formula) on F ≝ | FNot F ⇒ FNot (subst x G F) ]. -(* AGGIUNGERE ALCUNI TEST *) - (* NOTA ==== @@ -285,6 +284,25 @@ notation "hvbox(a \nbsp break mstyle color #0000ff (≡) \nbsp b)" non associat notation > "a ≡ b" non associative with precedence 50 for @{ equiv $a $b }. interpretation "equivalence for Formulas" 'equivF a b = (equiv a b). +(* Test 2 + ====== + + Viene fornita una formula di esempio `esempio2`, + e una formula `esempio3` che rimpiazzerà gli atomi + `FAtom 2` di `esempio2`. + + Il risultato atteso è la formula: + + FAnd (FImpl (FOr (FAtom O) (FAtom 1)) (FAtom 1)) + (FOr (FAtom O) (FAtom 1)) + +*) + +definition esempio2 ≝ (FAnd (FImpl (FAtom 2) (FAtom 1)) (FAtom 2)). + +definition esempio3 ≝ (FOr (FAtom 0) (FAtom 1)). + +eval normalize on (esempio2 [ esempio3 / 2]). (*DOCBEGIN