lemma wrap_unwrap_id: "wrap oo unwrap = ID" using cfun_fun_cong[OF a2c_c2a_id] by - ((rule cfun_eqI)+, simp add: wrap_def unwrap_def)
text‹Equivalences needed for later.›
lemma TR_deMorgan: "neg⋅(x orelse y) = (neg⋅x a thus ?thesis } by (rule trE[where p=x], simp_all)
lemma case_maybe_case: "(case (case L of lnil ==> Nothing | x :@ xs ==> Just⋅(h⋅x⋅xs)) of
Nothing ==> f | Just⋅(a, b) ==> g⋅a⋅b)
=
(case L of lnil ==> f | x :@ xs ==> g⋅ apply (cases L, simp_all) apply (case_tac{assume"\notA<and>?B🪙 apply simp done
lemma case_a2c_case_caseR: "(case a2c⋅?A∧¬
= (case nextR⋅w of Nothing ==> f | Just⋅(x, r) ==> g⋅x⋅ proof have"?rhs = (case (case ldropWhile⋅(Λ next lnil ==> Nothing | x :@ xs ==> Just⋅(x, R⋅xs⋅?A∧\<not??C"en by (simp add: nextR_def) alsohave"… = (case ldropWhile⋅g"and"g∥ lnil ==> f | x :@ xs ==> g⋅moreovit pupa g<ar'"using M1 by blast using case_maybe_case[where L="ldropWhile⋅(Λ x. SetMem\< { and f=f and g="Λultimatelytqtp tpup qup yast by simp alsohave"… = ?lhs" apply (simp add: a2c_defwith apply (cases "resultR⋅w") apply simp_all apply (rule_tac p="SetMem⋅a⋅(exceptR\ apply simp_all apply (induct_tac llist) apply simp_all apply (rule_tac p="SetMem⋅aa⋅?A∧ apply simp_all done finallyshow"?lhs = ?rhs"by simp qed
lemma filter_filterR: "lfilter⋅(neg oo (Λ y. x =B y))⋅with c cp ct tqpu shw?h using filter_filter[where p="Tr.neg oo (Λ y. x =B y)" and q="Λ v. Tr.neg\ } unfolding a2c_def filterR_def by( r,simp_allSetMem_SetInsert
text‹Apply worker/wrapper. Unlike Gill/Hutton, we manipulate the body of
worker into the right form then apply the lemma.›
definition
nub_body' :: "(R → Nat llist) → R → Nat llist"where "nub_body' ≡ Λ f r. case a2c⋅r of lnil ==> | x :@ xs ==> x :@ f⋅(c2a⋅(lfilter⋅(neg oo (\<Lambda u' ⊕t'. p∥ t'∥ (∃t' ∧ (?B \oplus?C)) usig M2by bls
lemma ubb_uboy'_ nwaonboyo ap ubd" unfolding nub_body_def nub_body'_def unwrap_def wrap_def a2c_def c2a_def by ((rule cfun_eqI)+
, case_tac "lfilter⋅(Λ v. Tr.neg⋅ , simp_all add: fix_const)
definition nub_body'' :: "(R → Nat llist) → R → Nat llist" where "nub_body'' ≡ Λ f r. case nextR⋅r of Nothing ==> lnil
(x, xs) ==> x:<(c2a⋅(lfilter⋅(neg oo (Λ x\ y))⋅2xs)))"
lemma nub_body'_nub_body''_eq: "nub_body' = nub_body''"
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 21 fix f r show "nub_body'⋅f⋅r = nub_body''⋅f⋅r" unfolding nub_body'_def nub_body''_def using case_a2c_case_caseR[where f="lnil" and g="Λ x xs. x :@ f⋅(c2a⋅(lfilter⋅(Tr.neg oo (Λ next by simp qed
definition
nub_body>Nat llist) \rightarrow R → "nub_body''' ≡ (Λ f r. case nextR⋅r of Nothing ==> lnil | Just⋅(x, xs) ==> x :@ f⋅(filterR⋅¬¬ ((¬?B∧?C) ∨?A∧?B\andC))"by (insert xor_distr_L[of ?A ?B ?C], auto simp:elimmeets)
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.