diff -r 86e0203db2da -r 988e92a70704 thys4/posix/FBound.thy --- a/thys4/posix/FBound.thy Wed Aug 31 12:51:53 2022 +0100 +++ b/thys4/posix/FBound.thy Wed Aug 31 23:57:42 2022 +0100 @@ -241,8 +241,8 @@ | "AZERO \1 ASEQ bs AZERO r" | "AZERO \1 ASEQ bs r AZERO" | "fuse (bs @ bs1) r2 \1 ASEQ bs (AONE bs1) r2" -| " AALTs bs (rs1 @ rs) \1 AALTs bs (rs1 @( AZERO # rs))" -| "AALTs bs1 (rsa @ (map (fuse bs1) rs1) @ rsb) \1 AALTs bs1 (rsa @ (AALTs bs1 rs1) # rsb)" +| "AALTs bs (rs1 @ rs) \1 AALTs bs (rs1 @( AZERO # rs))" +| "AALTs bs (rsa @ (map (fuse bs1) rs1) @ rsb) \1 AALTs bs (rsa @ (AALTs bs1 rs1) # rsb)" | "rerase a1 = rerase a2 \ AALTs bs (rsa @ [a1] @ rsb @ rsc) \1 AALTs bs (rsa @ [a1] @ rsb @ [a2] @ rsc) " | "r1 \1 r2 \ r1 \1 ASEQ bs (AONE bs1) r2" | "r2 \1 r1 \ AALTs bs (rs1 @ r2 # rs) \1 AALTs bs (rs1 @ r1 # rs)" @@ -252,6 +252,42 @@ | "AZERO \1 AALTs bs []" | "fuse bs r \1 AALTs bs [r]" | "\r1' \1 r1; r2' \1 r2\ \ bsimp_ASEQ bs1 r1' r2' \1 ASEQ bs1 r1 r2" +| "\AALTs bs rs1 \1 AALTs bs rs2; r1 \1 r2 \ \ AALTs bs (r1 # rs1) \1 AALTs bs (r2 # rs2)" +| "\r1 \1 r2; r2 \1 r3 \ \ r1 \1 r3" + + +lemma leq1_6_variant1: + shows "AALTs bs ( (map (fuse bs1) rs1) @ rsb) \1 AALTs bs ((AALTs bs1 rs1) # rsb)" + by (metis leq1.intros(6) self_append_conv2) + + + +lemma flts_leq1: + shows "AALTs bs (flts rs) \1 AALTs bs rs" + apply(induct rule: flts.induct) + apply (simp add: leq1.intros(1)) + apply simp + apply (metis append_Nil leq1.intros(17) leq1.intros(5)) + apply simp + apply(subgoal_tac "AALTs bs (map (fuse bsa) rs1 @ flts rs) \1 AALTs bs (AALTs bsa rs1 # flts rs)") + apply (meson leq1.intros(1) leq1.intros(16) leq1.intros(17)) + using leq1_6_variant1 apply presburger + apply (simp add: leq1.intros(1) leq1.intros(16)) + using leq1.intros(1) leq1.intros(16) apply auto[1] + using leq1.intros(1) leq1.intros(16) apply force + apply (simp add: leq1.intros(1) leq1.intros(16)) + using leq1.intros(1) leq1.intros(16) by force + +lemma dB_leq12: + shows "AALTs bs (distinctWith rs1 eq1 (set rs2)) \1 AALTs bs (rs1 @ rs2)" + sorry + + +lemma dB_leq1: + shows "AALTs bs (distinctWith rs eq1 {}) \1 AALTs bs rs" + by (metis append.right_neutral dB_leq12 list.set(1)) + + lemma stupid_leq1_1: shows " rerase r2 \ RSEQ r (RSEQ RONE (rerase r2))" @@ -276,7 +312,8 @@ apply(erule exE) apply simp apply (metis asize_rsize le_SucI rerase_fuse trans_le_add2) - by (smt (verit, best) Suc_eq_plus1 ab_semigroup_add_class.add_ac(1) add.commute add.right_neutral add_cancel_right_right add_mono_thms_linordered_semiring(1) asize.simps(5) asize_rsize nat_add_left_cancel_le order.trans order_trans plus_1_eq_Suc rSEQ_mono rerase_bsimp_ASEQ rsize.simps(5)) + apply (smt (verit, best) Suc_eq_plus1 ab_semigroup_add_class.add_ac(1) add.commute add.right_neutral add_cancel_right_right add_mono_thms_linordered_semiring(1) asize.simps(5) asize_rsize nat_add_left_cancel_le order.trans order_trans plus_1_eq_Suc rSEQ_mono rerase_bsimp_ASEQ rsize.simps(5)) + sorry @@ -316,9 +353,9 @@ apply force apply simp apply(simp add: asize_rsize) - by (simp add: rerase_fuse size_deciding_equality4) - - + apply (simp add: rerase_fuse size_deciding_equality4) + apply (metis Suc_n_not_le_n asize_rsize leq1.intros(15) leq1_size rsize.simps(5) trans_le_add2) + sorry @@ -344,9 +381,11 @@ apply simp apply simp apply simp - apply simp - using r_finite1 rerase_fuse by auto + apply simp + using r_finite1 rerase_fuse apply auto[1] + apply (smt (verit, best) BlexerSimp.bsimp_ASEQ0 BlexerSimp.bsimp_ASEQ2 bsimp_ASEQ.simps(1) bsimp_ASEQ1 leq1_trans1 rerase.simps(5) rerase_bsimp_ASEQ rerase_fuse rrexp.inject(2) rsimp_SEQ.simps(22)) + sorry @@ -419,7 +458,16 @@ shows "bsimp r \1 r" apply(induct rule: bsimp.induct) apply simp + apply (simp add: leq1.intros(15)) + apply simp + apply(case_tac rs) + apply simp + apply (simp add: leq1.intros(13)) + apply(case_tac list) + apply simp + + sorry