feat: Big ops#113
Draft
lzy0505 wants to merge 9 commits intoleanprover-community:v4.26.0-unstablefrom
Draft
Conversation
# Conflicts: # src/Iris/Algebra/CMRA.lean
ahuoguo
reviewed
Jan 26, 2026
| simp only [domSet, FiniteMapLaws.map_to_list_empty, List.map_nil, FiniteSetLaws.ofList_nil] | ||
|
|
||
| /-- The domain after insert includes the inserted key. -/ | ||
| theorem domSet_insert (m : M V) (k : K) (v : V) : |
Contributor
There was a problem hiding this comment.
the following corresponds to dom_insert in stdpp:
theorem domSet_insert_l (m : M V) (i : K) (v: V):
(domSet (insert m i v)) ≡ (singleton i : S) ∪ domSet m := by
intros j
rw [← elem_of_domSet]
rw [mem_union]
simp only [FiniteMapLaws.lookup_insert_Some]
rw [← elem_of_domSet]
by_cases h : i = j
· rw [h]
apply Iff.intro
· intro _
left
exact (mem_singleton j j).mpr rfl
· intro _
exact ⟨v, Or.inl ⟨rfl, rfl⟩⟩
· apply Iff.intro
· intro ⟨x, hx⟩
cases hx with
| inl hl => exact absurd hl.1 h
| inr hr => exact Or.inr ⟨x, hr.2⟩
· intro hor
cases hor with
| inl hl =>
refine absurd hl ?_
intro _
exact (h ((mem_singleton j i).mp hl).symm)
| inr hr =>
have ⟨x, hx⟩ := hr
exact ⟨x, Or.inr ⟨h, hx⟩⟩
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of big_op.v and its dependencies.
TODO:
Missing lemmas (could be incomplete, double-check)
big_sepLbig_sepL_nil_persistentbig_sepL_nil_affinebig_sepL_timelessbig_sepL_timeless'big_sepL_timeless_idbig_sepL_zip_seqZbig_sepL2big_sepL2_proper_2big_sepL2_closedbig_sepL2_nil_persistentbig_sepL2_persistentbig_sepL2_nil_affinebig_sepL2_affinebig_sepL2_nil_timelessbig_sepL2_timelessbig_sepL2_timeless'big_sepL2_later_1big_sepL2_laterbig_sepL2_laterN_1big_sepL2_laterNbig_andLbig_andL_submseteqbig_andL_nebig_andL_mono'big_andL_id_mono'big_andL_nil_absorbingbig_andL_absorbingbig_andL_absorbing'big_andL_nil_persistentbig_andL_persistentbig_andL_timelessbig_andL_timeless'big_opLbig_orL_nebig_orL_nil_timelessbig_orL_timelessbig_orL_timeless'big_orL_zip_seqZbig_sepMbig_sepM_empty_timelessbig_sepM_timelessbig_sepM_timeless'big_andMbig_andM_empty_timelessbig_andM_timelessbig_andM_timeless'big_andM_fn_insertbig_andM_fn_insert'big_sepSbig_sepS_empty_timelessbig_sepS_timelessbig_sepS_timeless'big_sepMSbig_sepM2