| S m ⇒
match m with
[ O ⇒ skipfact O
- | S _ ⇒ S m * skipfact (pred m) * skipfact O ]]
+ | S _ ⇒ S m * skipfact (pred m) * skipfact (pred m) ]]
**)
ntheorem psym_plus: ∀n,m. n + m = m + n.
nqed.
ndefinition skipfact_dom: uuAx.
- @ nat; #n; ncases n [ napply None | #m; ncases m [ napply (Some … O) | #_; napply (Twice … (pred m) O) ]
+ @ nat; #n; ncases n [ napply None | #m; ncases m [ napply (Some … O) | #_; napply (Twice … (pred m) (pred m)) ]
nqed.
ntheorem skipfact_base_dec:
| #y; *; #a; #E; nrewrite > E; ncases a; nnormalize; // ]
##| #p; #H1; #H2; @2; nnormalize
[ //
- | #y; *; #a; #E; nrewrite > E; ncases a; nnormalize
- [ nrewrite < (plus_n_Sm …); //
- ##| /2/ ]
+ | #y; *; #a; #E; nrewrite > E; ncases a; nnormalize;
+ nrewrite < (plus_n_Sm …); // ]##]
nqed.
ndefinition skipfact: ∀n:nat. n ◃ mk_powerclass ? (λx: uuax skipfact_dom.x=O) → nat.
napply (S m * H true * H false) ]
nqed.
-nlemma test: skipfact four ? = eight. ##[##2: napply (skipfact_partial two)]
+nlemma test: skipfact four ? = four * two * two. ##[##2: napply (skipfact_partial two)]
nnormalize; //.
nqed.
\ No newline at end of file