theory Specifications_with_bundle_mixins imports"HOL-Combinatorics.Perm" begin
locale involutory = opening permutation_syntax + fixes f :: ‹'a perm\ assumes involutory: ‹∧x. f ⟨$⟩ (f ⟨$⟩ x) = x› begin
lemma‹f * f = 1› using involutory by (simp add: perm_eq_iff apply_sequence)
end
context involutory begin
thm involutory 🍋‹syntaxfrom permutation_syntax only present inlocalespecificationand initial block›
end
class at_most_two_elems = opening permutation_syntax + assumes swap_distinct: ‹a ≠ b ==>⟨a ↔ b⟩⟨$⟩ c ≠ c› begin
lemma‹card (UNIV :: 'a set) \ 2\ proof (rule ccontr) fix a :: 'a assume‹¬ card (UNIV :: 'a set) \ 2\ thenhave c0: ‹card (UNIV :: 'a set) \ 3\ by simp thenhave [simp]: ‹finite (UNIV :: 'a set)\ using card.infinite by fastforce from c0 card_Diff1_le [of UNIV a] have ca: ‹card (UNIV - {a}) ≥ 2› by simp thenobtain b where‹b ∈ (UNIV - {a})› by (metis all_not_in_conv card.empty card_2_iff' le_zero_eq) with ca card_Diff1_le [of ‹UNIV - {a}› b] have cb: ‹card (UNIV - {a, b}) ≥ 1›and‹a ≠ b› by simp_all thenobtain c where‹c ∈ (UNIV - {a, b})› by (metis One_nat_def all_not_in_conv card.empty le_zero_eq nat.simps(3)) thenhave‹a ≠ c›‹b ≠ c› by auto with swap_distinct [of a b c] show False by (simp add: ‹a ≠ b›) qed
end
thm swap_distinct 🍋‹syntaxfrom permutation_syntax only present inclassspecificationand initial block›
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.