Update
This commit is contained in:
parent
4961ba9f19
commit
1e27de7157
@ -308,7 +308,7 @@ Proof.
|
||||
|
||||
assert (forall (b: list X),
|
||||
map (fun e : nat => nth e b x) (seq 0 (length b)) = b).
|
||||
intro b. induction b. reflexivity. (* rewrite <- IHb at 2. *)
|
||||
intro b. induction b. reflexivity.
|
||||
|
||||
replace (seq 0 (length (a :: b))) with (0:: map S (seq 0 (length b))).
|
||||
rewrite map_cons. rewrite map_map.
|
||||
@ -360,8 +360,77 @@ Proof.
|
||||
intro s. rewrite map_map. induction s; intro K. reflexivity.
|
||||
simpl. rewrite IHs.
|
||||
|
||||
rewrite nth_error_nth' with (d := x).
|
||||
replace (nth_error (map (fun e : nat => nth (g e) base x)
|
||||
(seq 0 (length base))) (f a))
|
||||
with (Some ((fun e => nth (g e) base x)
|
||||
(nth (f a) (seq 0 (length base)) 0))).
|
||||
|
||||
|
||||
assert (forall m n f' g',
|
||||
FinFun.bFun m f' -> FinFun.bFun m g'
|
||||
-> (forall x : nat, x < m -> g' (f' x) = x /\ f' (g' x) = x)
|
||||
-> n < m -> g' (nth (f' n) (seq 0 m) 0) = n).
|
||||
intros m n f' g'. intros J J1 J2 J3.
|
||||
|
||||
assert (forall q p, p < q -> nth p (seq 0 q) 0 = p).
|
||||
intro q. induction q; intro p'; intro J4.
|
||||
apply Nat.nlt_0_r in J4. contradiction.
|
||||
rewrite Nat.lt_succ_r in J4. rewrite Nat.le_lteq in J4. destruct J4.
|
||||
rewrite seq_S. rewrite app_nth1. apply IHq. assumption.
|
||||
rewrite seq_length. assumption. rewrite H6. rewrite seq_nth.
|
||||
reflexivity. apply Nat.lt_succ_diag_r. rewrite H6.
|
||||
apply J2 in J3. destruct J3. apply H7. apply J. assumption.
|
||||
|
||||
rewrite H6. reflexivity. assumption. assumption. assumption.
|
||||
apply K. apply in_eq.
|
||||
rewrite nth_error_nth' with (d := x).
|
||||
|
||||
replace (nth (f a) (ma
|
||||
rewrite <- map_nth at 1.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
assert (forall p q, p < q -> nth p (seq 0 q) 0 = p).
|
||||
intro p'. induction p'; intro q; intro J4.
|
||||
destruct q. apply Nat.nlt_0_r in J4. contradiction.
|
||||
reflexivity.
|
||||
|
||||
|
||||
intro m. induction m; intros n f' g'; intros J J1 J2 J3.
|
||||
apply Nat.nlt_0_r in J3. contradiction. simpl in J3.
|
||||
rewrite Nat.lt_succ_r in J3. rewrite Nat.le_lteq in J3. destruct J3.
|
||||
rewrite seq_S. rewrite app_nth1. apply IHm. assumption.
|
||||
rewrite seq_length. apply H2.
|
||||
|
||||
replace (seq 0 (length (a0::b))) with (0 :: (seq 1 (length b))).
|
||||
rewrite cons_seq.
|
||||
|
||||
|
||||
|
||||
prouver avec map_nth
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rewrite nth_error_nth' with (d := nth (g 0) base x).
|
||||
rewrite nth_error_nth' with (d := nth (g 0) base x).
|
||||
r
|
||||
replace (nth (g 0) base x) with ((fun e => nth (g e) base x) 0).
|
||||
rewrite nth_error_nth' with (d := (fun e => nth (g e) base x) 0).
|
||||
rewrite map_nth.
|
||||
rewrite nth_error_nth' with (d := x).
|
||||
|
||||
rewrite nth_error_nth' with (d := (fun e => nth (g e) base x) 0).
|
||||
rewrite nth_error_nth' with (d := x).
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user