Commit 842ef174 by Lawrence Paulson

### neater proof

parent 7d6c6b7a5cd8
 ... ... @@ -88,23 +88,20 @@ lemma init_segment_empty [iff]: "init_segment {} S" lemma init_segment_insert_iff: assumes Sn: "less_sets S {n}" and TS: "\x. x \ T-S \ n\x" shows "init_segment (insert n S) T \ init_segment S T \ n \ T" proof safe assume L: "init_segment (insert n S) T" proof assume "init_segment (insert n S) T" then have "init_segment ({n} \ S) T" by auto then show "init_segment S T" by (metis (no_types) Sn init_segment_Un init_segment_trans sup.commute) show "n \ T" using L by (auto simp: init_segment_def) then show "init_segment S T \ n \ T" by (metis Sn Un_iff init_segment_def init_segment_trans insertI1 sup_commute) next assume "init_segment S T" "n \ T" then obtain S' where S': "T = S \ S'" "less_sets S S'" assume rhs: "init_segment S T \ n \ T" then obtain R where R: "T = S \ R" "less_sets S R" by (auto simp: init_segment_def less_sets_def) then have "S \ S' = insert n (S \ (S' - {n})) \ less_sets (insert n S) (S' - {n})" unfolding less_sets_def using \n \ T\ TS nat_less_le by auto then have "S\R = insert n (S \ (R-{n})) \ less_sets (insert n S) (R-{n})" unfolding less_sets_def using rhs TS nat_less_le by auto then show "init_segment (insert n S) T" using S'(1) init_segment_Un by force using R init_segment_Un by force qed lemma init_segment_insert: ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!