>bigop_Strue in ⊢ (??(??%)?); // <associative_plus
<commutative_plus in ⊢ (??(? % ?) ?); >associative_plus @eq_f2
[<minus_n_n >bc_n_n >bc_n_n normalize //
- |>bigop_0 >associative_plus >commutative_plus in ⊢ (??(??%)?);
+ |>(bigop_0 ??? plusA) >associative_plus >commutative_plus in ⊢ (??(??%)?);
<associative_plus >(bigop_0 n ?? plusA) @eq_f2
[cut (∀a,b. plus a b = plusAC a b) [//] #Hplus >Hplus
>(bigop_op n ??? plusAC) @same_bigop //
[@leb_true_to_le //
|>commutative_times in ⊢ (??%); > times_exp
@(transitive_le ? (exp n 2))
- [<associative_times >exp_2 in ⊢ (??%); @le_times //
+ [<associative_times >exp_2 in ⊢ (??%); @le_times [@le18|//]
|@(le_exp1 … (lt_O_S ?))
@(le_plus_to_le 3)
cut (3+2*n/3*3 = S(2*n/3)*3) [//] #eq1 >eq1
(¬ (memb (Nat_to m) (mk_Sig ?? i k) (enumnaux n m h))) = true.
#m #n elim n -n // #n #Hind #i #ltm #k #ltni @sym_eq @noteq_to_eqnot @sym_not_eq
% #H cases (orb_true_l … H)
- [#H1 @(absurd … (\P H1)) % #Hfalse
- cut (∀A,P,a,a1,h,h1.mk_Sig A P a h = mk_Sig A P a1 h1 → a = a1)
- [#A #P #a #a1 #h #h1 #H destruct (H) %] #Hcut
- lapply (Hcut nat (λi.i<m) i n ? ? Hfalse) #Hfalse @(absurd … ltni)
- @le_to_not_lt >Hfalse @le_n
- |<(notb_notb (memb …)) >Hind normalize /2/
+ [whd in ⊢ (??%?→?); #H1 @(absurd … ltni) @le_to_not_lt
+ >(eqb_true_to_eq … H1) @le_n
+ |<(notb_notb (memb …)) >Hind normalize /2 by lt_to_le, absurd/
]
qed.
-
lemma enumn_unique_aux: ∀n,m. ∀h:n ≤ m. uniqueb (Nat_to m) (enumnaux n m h) = true.
#n elim n -n // #n #Hind #m #h @true_to_andb_true // @memb_enumn //
qed.
definition enum_prod ≝ λA,B:DeqSet.λl1.λl2.
compose ??? (mk_Prod A B) l1 l2.
-
+
lemma enum_prod_unique: ∀A,B,l1,l2.
uniqueb A l1 = true → uniqueb B l2 = true →
uniqueb ? (enum_prod A B l1 l2) = true.
#A #B #l1 elim l1 //
#a #tl #Hind #l2 #H1 #H2 @uniqueb_append
- [@unique_map_inj //
+ [@unique_map_inj [#x #y #Heq @(eq_f … \snd … Heq) | //]
|@Hind // @(andb_true_r … H1)
|#p #H3 cases (memb_map_to_exists … H3) #b *
#Hmemb #eqp <eqp @(not_to_not ? (memb ? a tl = true))
}
}}.
+(* it seems unbelivable, but it works! *)
+notation > "≔ (list0 ( (list1 (ident x) sep , ) opt (: T) ) sep ,) opt (; (list1 (ident U ≟ term 19 V ) sep ,)) ⊢ term 19 Px ≡≡ term 19 Py"
+ with precedence 90
+ for @{ ${ fold right
+ @{ ${ default
+ @{ ${ fold right
+ @{ 'hint_decl2 $Px $Py }
+ rec acc1 @{ let ( ${ident U} : ?) ≝ $V in $acc1} } }
+ @{ 'hint_decl2 $Px $Py }
+ }
+ }
+ rec acc @{
+ ${ fold right @{ $acc } rec acc2
+ @{ ∀${ident x}:${ default @{ $T } @{ ? } }.$acc2 } }
+ }
+ }}.
+
include "basics/pts.ma".
definition hint_declaration_Type0 ≝ λA:Type[0] .λa,b:A.Prop.
definition hint_declaration_CProp1 ≝ λA:CProp[1].λa,b:A.Prop.
definition hint_declaration_CProp2 ≝ λa,b:CProp[2].Prop.
-interpretation "hint_decl_Type2" 'hint_decl a b = (hint_declaration_Type2 a b).
-interpretation "hint_decl_CProp2" 'hint_decl a b = (hint_declaration_CProp2 a b).
+interpretation "hint_decl_Type2" 'hint_decl2 a b = (hint_declaration_Type2 a b).
+interpretation "hint_decl_CProp2" 'hint_decl2 a b = (hint_declaration_CProp2 a b).
interpretation "hint_decl_Type1" 'hint_decl a b = (hint_declaration_Type1 ? a b).
interpretation "hint_decl_CProp1" 'hint_decl a b = (hint_declaration_CProp1 ? a b).
interpretation "hint_decl_CProp0" 'hint_decl a b = (hint_declaration_CProp0 ? a b).
(* ---------------------------------------- *) ⊢
setoid ≡ target1 ? MR sol.
-*)
\ No newline at end of file
+*)