A -> X ⊂ B -> X ⊂ A ∩ B. Proof. move=> HXA HXB x HX. (* HXA: X ⊂ A, HXB: X ⊂ B, ∀x, HX: x ∈ X をコンテキストへ移動する *) split. (* x ∈ A ∩ B を x ∈ A と x ∈ B に場合分けして考える *) - by apply HXA. (* x ∈ A なら X ⊂ A より成り立つ *) - by apply HXB. (* x ∈ A なら X ⊂ B より成り立つ *) Qed. 6
Prop := | card_empty : cardinal (Empty_set U) 0 | card_add : forall (A:Ensemble U) (n:nat), cardinal A n -> forall x:U, ~ In U A x -> cardinal (Add U A x) (S n). cardinalの定義(数式) cardinalの定義だけではまともに扱えないので、それを補助する補題が必要です。 8
U X n -> forall x:U, In U X x -> cardinal U (Subtract U X x) (pred n). Proof. intros X n H'; elim H'. - intros x H'0; elim H'0. - clear H' n X. intros X n H' H'0 x H'1 x0 H'2. elim (classic (In U X x0)). + intro H'4; rewrite (add_soustr_xy U X x x0). * elim (classic (x = x0)). -- intro H'5. absurd (In U X x0); auto with sets. rewrite <- H'5; auto with sets. -- intro H'3; try assumption. cut (S (pred n) = pred (S n)). ++ intro H'5; rewrite <- H'5. apply card_add; auto with sets. red; intro H'6; elim H'6. intros H'7 H'8; try assumption. elim H'1; auto with sets. ++ unfold pred at 2. apply (Nat.lt_succ_pred 0). apply inh_card_gt_O with (X := X); auto with sets. apply Inhabited_intro with (x := x0); auto with sets. * red; intro H'3. apply H'1. elim H'3; auto with sets. rewrite H'3; auto with sets. + elim (classic (x = x0)). * intro H'3; rewrite <- H'3. cut (Subtract U (Add U X x) x = X); auto with sets. intro H'4; rewrite H'4; auto with sets. * intros H'3 H'4; try assumption. absurd (In U (Add U X x) x0); auto with sets. red; intro H'5; try exact H'5. lapply (Add_inv U X x x0); tauto. Qed. 9