Skip to content

Commit

Permalink
Merge pull request #57 from math-comp/finSet_rect
Browse files Browse the repository at this point in the history
removed useless premises in finSet_rect
  • Loading branch information
CohenCyril authored Sep 24, 2019
2 parents 6d2b83d + 9201eba commit 80bbc85
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions finmap.v
Original file line number Diff line number Diff line change
Expand Up @@ -2372,11 +2372,13 @@ End BigFOpsSeq.

(* ** Induction Principles *)
Lemma finSet_rect (T : choiceType) (P : {fset T} -> Type) :
P fset0 -> (forall X, (forall Y, Y `<` X -> P Y) -> P X) -> forall X, P X.
(forall X, (forall Y, Y `<` X -> P Y) -> P X) -> forall X, P X.
Proof.
move=> P0 Psub X; move: (leqnn #|` X|); move: (X in Y in _ <= Y) => Y.
elim: #|` _| X => [|n IHn] {Y} X; first by rewrite leqn0 cardfs_eq0 => /eqP->.
move=> Xleq; apply: Psub => Y XsubY; apply: IHn.
move=> ih X; move: (leqnn #|` X|); move: (X in Y in _ <= Y) => Y.
elim: #|` _| X => [|n IHn] {Y} X.
rewrite leqn0 cardfs_eq0 => /eqP ->; apply: ih.
by move=> Y /fproper_ltn_card.
move=> Xleq; apply: ih => Y XsubY; apply: IHn.
by rewrite -ltnS (leq_trans _ Xleq) // fproper_ltn_card.
Qed.

Expand All @@ -2386,9 +2388,7 @@ Lemma fset_bounded_coind (T : choiceType) (P : {fset T} -> Type) (U : {fset T}):
Proof.
move=> Psuper X XsubU; rewrite -[X](fsetDK XsubU)//.
have {XsubU}: (U `\` X) `<=` U by rewrite fsubsetDl.
elim: (_ `\` X) => {X} [|X IHX] XsubU.
rewrite fsetD0; apply: Psuper => Y /fsub_proper_trans UY/UY.
by rewrite fproperEneq eqxx.
elim: (_ `\` X) => {X} X IHX XsubU.
apply: Psuper => Y /fsetDK<-; rewrite fproperD2l ?fsubsetDl //.
by move=> /IHX; apply; rewrite fsubsetDl.
Qed.
Expand Down

0 comments on commit 80bbc85

Please sign in to comment.