Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Iris/Iris/Algebra/CMRA.lean
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,8 @@ theorem discrete_inc_l {x y : α} [HD : DiscreteE x] (Hv : ✓{0} y) (Hle : x
theorem discrete_inc_r {x y : α} [HD : DiscreteE y] : x ≼{0} y → x ≼ y
| ⟨z, hz⟩ => ⟨z, HD.discrete hz⟩

@[reducible, rocq_alias cmra_op_discrete]
def discrete_op {x y : α} (Hv : ✓{0} x • y) [Hx : DiscreteE x] [Hy : DiscreteE y] :
@[rocq_alias cmra_op_discrete]
theorem discrete_op {x y : α} (Hv : ✓{0} x • y) [Hx : DiscreteE x] [Hy : DiscreteE y] :
DiscreteE (x • y) where
discrete h :=
let ⟨_w, _t, wt, wx, ty⟩ := extend ((Dist.validN h).mp Hv) h.symm
Expand Down
8 changes: 4 additions & 4 deletions Iris/Iris/Algebra/Heap.lean
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ instance [OFE α] [OFE β] {f : α → β} [hne : OFE.NonExpansive f] : OFE.NonE
cases get? m1 k <;> cases get? m2 k <;> simp
apply OFE.NonExpansive.ne

def map_id [OFE α] (a : H α):
theorem map_id [OFE α] (a : H α) :
PartialMap.map H id a ≡ a := by
intro n x
simp [PartialMap.map, get?_bindAlter, Option.bind]
Expand All @@ -593,19 +593,19 @@ def mapO [OFE α] [OFE β] (f : α -n> β) : OFE.Hom (H α) (H β) where
f := map H f
ne := inferInstance

def map_ext [OFE α] [OFE β] {f g : α -> β} (heq : f ≡ g) : map H f m ≡ map H g m := by
theorem map_ext [OFE α] [OFE β] {f g : α -> β} (heq : f ≡ g) : map H f m ≡ map H g m := by
intro n k
simp [map, get?_bindAlter, Option.bind]
cases get? m k <;> simp
exact heq _ _

def map_ne [OFE α] [OFE β] (f g : α -> β) {heq : f ≡{n}≡ g} : map H f m ≡{n}≡ map H g m := by
theorem map_ne [OFE α] [OFE β] (f g : α -> β) {heq : f ≡{n}≡ g} : map H f m ≡{n}≡ map H g m := by
simp [OFE.Dist, Option.Forall₂, map, get?_bindAlter]
intro k
cases get? m k <;> simp
exact heq _

def map_compose [OFE α] [OFE β] [OFE γ] (f : α -> β) (g : β -> γ) m :
theorem map_compose [OFE α] [OFE β] [OFE γ] (f : α -> β) (g : β -> γ) m :
map H (g.comp f) m ≡ map H g (map H f m) := by
intro n k
simp [map, get?_bindAlter]
Expand Down
2 changes: 2 additions & 0 deletions Iris/Iris/Algebra/IProp.lean
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ open COFE

abbrev GType := Nat

set_option linter.checkUnivs false in
@[rocq_alias gFunctor]
abbrev GFunctor := Σ F : OFunctorPre, RFunctorContractive F

set_option linter.checkUnivs false in
@[rocq_alias gFunctors]
def BundledGFunctors := GType → GFunctor

Expand Down
3 changes: 2 additions & 1 deletion Iris/Iris/Algebra/OFE.lean
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ theorem chain_none_const [OFE V] {c : Chain (Option V)} (H : c n = none) :
exact (Hc Hnk).symm

/-- If a chain of Option is ever some, it is the lift a chain by some. -/
def chain_option_some [OFE V] {c : Chain (Option V)} (H : c n = some v) :
theorem chain_option_some [OFE V] {c : Chain (Option V)} (H : c n = some v) :
∃ c' : Chain V, c = Chain.map ⟨some, OFE.Option.some.ne⟩ c' := by
have HVc (k) : ∃ v', c k = some v' := by
rcases h : c.chain k with (_|v')
Expand Down Expand Up @@ -1158,6 +1158,7 @@ instance {P : α → Type _} [∀ x, OFE (P x)] [∀ x, IsCOFE (P x)] : IsCOFE (
exact hequiv
#rocq_ignore sigT_compl "Local Compl definition; folded into Lean's IsCOFE instance."

set_option linter.checkUnivs false in
abbrev OFunctorPre := ∀ α β [COFE α] [COFE β], Type _
#rocq_ignore oFunctor_apply "Definition for application of an `oFunctor`; subsumed by `OFunctorPre` in Lean."

Expand Down
2 changes: 1 addition & 1 deletion Iris/Iris/Algebra/UPred.lean
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def UPred.holds_unpacked {M : Type _} [UCMRA M] (P : UPred M) (n : Nat) (x : M)
Prop :=
P.holds n ⟨x, Hx⟩

def UPred.mono_unpacked {M : Type _} [UCMRA M] (P : UPred M) {n1 n2 : Nat} {x1 x2 : M}
theorem UPred.mono_unpacked {M : Type _} [UCMRA M] (P : UPred M) {n1 n2 : Nat} {x1 x2 : M}
(Hx1 : ✓{n1} x1) (Hx2 : ✓{n2} x2) (HP : P.holds_unpacked n1 x1 Hx1) (Hxle : x1 ≼{n2} x2)
(Hle : n2 ≤ n1) : P.holds_unpacked n2 x2 Hx2 :=
P.mono HP Hxle Hle
Expand Down
4 changes: 2 additions & 2 deletions Iris/Iris/BI/BigOp/BigOp.lean
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ instance orMonoidOps [BI PROP] : MonoidOps (or (PROP := PROP)) iprop(False) wher
/-! ## Homomorphism helpers for OFE equivalence -/

/-- Build a `MonoidHomomorphism` for OFE equivalence from just the essential fields. -/
@[reducible, expose] def MonoidHomomorphism.ofEquiv [OFE PROP] {op₁ op₂ : PROP → PROP → PROP}
theorem MonoidHomomorphism.ofEquiv [OFE PROP] {op₁ op₂ : PROP → PROP → PROP}
{u₁ u₂ : PROP} [MonoidOps op₁ u₁] [MonoidOps op₂ u₂] {f : PROP → PROP}
(hne : NonExpansive f) (hop : ∀ {x y}, f (op₁ x y) ≡ op₂ (f x) (f y))
(hunit : f u₁ ≡ u₂) : MonoidHomomorphism op₁ op₂ u₁ u₂ (· ≡ ·) f where
Expand All @@ -51,7 +51,7 @@ instance orMonoidOps [BI PROP] : MonoidOps (or (PROP := PROP)) iprop(False) wher
map_unit := hunit

/-- Build a `WeakMonoidHomomorphism` for OFE equivalence from just the essential fields. -/
@[reducible, expose] def WeakMonoidHomomorphism.ofEquiv [OFE PROP] {op₁ op₂ : PROP → PROP → PROP}
theorem WeakMonoidHomomorphism.ofEquiv [OFE PROP] {op₁ op₂ : PROP → PROP → PROP}
{u₁ u₂ : PROP} [MonoidOps op₁ u₁] [MonoidOps op₂ u₂] {f : PROP → PROP}
(hne : NonExpansive f) (hop : ∀ {x y}, f (op₁ x y) ≡ op₂ (f x) (f y)) :
WeakMonoidHomomorphism op₁ op₂ u₁ u₂ (· ≡ ·) f where
Expand Down
22 changes: 11 additions & 11 deletions Iris/Iris/BI/Embedding.lean
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ instance embed_timeless [BiEmbedLater PROP1 PROP2] (P : PROP1) [Timeless P] :

/-- Cross-type `MonoidHomomorphism` for `⎡·⎤` w.r.t. OFE equivalence (mirrors
`MonoidHomomorphism.ofEquiv`, which is single-type). -/
@[reducible] def mkEmbedHom {op₁ : PROP1 → PROP1 → PROP1} {op₂ : PROP2 → PROP2 → PROP2}
theorem mkEmbedHom {op₁ : PROP1 → PROP1 → PROP1} {op₂ : PROP2 → PROP2 → PROP2}
{u₁ : PROP1} {u₂ : PROP2} [MonoidOps op₁ u₁] [MonoidOps op₂ u₂]
(hop : ∀ {x y}, (embed (op₁ x y) : PROP2) ≡ op₂ (embed x) (embed y))
(hunit : (embed u₁ : PROP2) ≡ u₂) :
Expand Down Expand Up @@ -514,26 +514,26 @@ def embedBiEmbed : BiEmbed PA PC :=
}

/-- `BiEmbedEmp` transfers along composition. -/
@[reducible, rocq_alias embed_embed_emp]
def embed_embed_emp [BiEmbedEmp PA PB] [BiEmbedEmp PB PC] :
@[rocq_alias embed_embed_emp]
theorem embed_embed_emp [BiEmbedEmp PA PB] [BiEmbedEmp PB PC] :
@BiEmbedEmp PA PC _ _ (embedBiEmbed PB) :=
letI : BiEmbed PA PC := embedBiEmbed PB
{ embed_emp_1 := (embed_mono (PROP1 := PB) (PROP2 := PC)
(BiEmbedEmp.embed_emp_1 (PROP1 := PA) (PROP2 := PB))).trans
(BiEmbedEmp.embed_emp_1 (PROP1 := PB) (PROP2 := PC)) }

/-- `BiEmbedLater` transfers along composition. -/
@[reducible, rocq_alias embed_embed_later]
def embed_embed_later [BiEmbedLater PA PB] [BiEmbedLater PB PC] :
@[rocq_alias embed_embed_later]
theorem embed_embed_later [BiEmbedLater PA PB] [BiEmbedLater PB PC] :
@BiEmbedLater PA PC _ _ (embedBiEmbed PB) :=
letI : BiEmbed PA PC := embedBiEmbed PB
{ embed_later := fun P => (embed_congr (PROP1 := PB) (PROP2 := PC)
(BiEmbedLater.embed_later (PROP1 := PA) (PROP2 := PB) P)).trans
(BiEmbedLater.embed_later (PROP1 := PB) (PROP2 := PC) (embed (A := PA) (B := PB) P)) }

/-- `BiEmbedBUpd` transfers along composition. -/
@[reducible, rocq_alias embed_embed_bupd]
def embed_embed_bupd [BIUpdate PA] [BIUpdate PB] [BIUpdate PC]
@[rocq_alias embed_embed_bupd]
theorem embed_embed_bupd [BIUpdate PA] [BIUpdate PB] [BIUpdate PC]
[BiEmbedBUpd PA PB] [BiEmbedBUpd PB PC] :
@BiEmbedBUpd PA PC _ _ (embedBiEmbed PB) _ _ :=
letI : BiEmbed PA PC := embedBiEmbed PB
Expand All @@ -542,8 +542,8 @@ def embed_embed_bupd [BIUpdate PA] [BIUpdate PB] [BIUpdate PC]
(BiEmbedBUpd.embed_bupd (PROP1 := PB) (PROP2 := PC) (embed (A := PA) (B := PB) P)) }

/-- `BiEmbedFUpd` transfers along composition. -/
@[reducible, rocq_alias embed_embed_fupd]
def embed_embed_fupd [BIFUpdate PA] [BIFUpdate PB] [BIFUpdate PC]
@[rocq_alias embed_embed_fupd]
theorem embed_embed_fupd [BIFUpdate PA] [BIFUpdate PB] [BIFUpdate PC]
[BiEmbedFUpd PA PB] [BiEmbedFUpd PB PC] :
@BiEmbedFUpd PA PC _ _ (embedBiEmbed PB) _ _ :=
letI : BiEmbed PA PC := embedBiEmbed PB
Expand All @@ -559,8 +559,8 @@ section
variable {QA QB QC : Type _} [Sbi QA] [Sbi QB] [Sbi QC]
[BiEmbed QA QB] [BiEmbed QB QC] [BiEmbedSbi QA QB] [BiEmbedSbi QB QC]

@[reducible, rocq_alias embed_embed_sbi]
def embed_embed_sbi : @BiEmbedSbi QA QC _ _ (embedBiEmbed QB) _ _ :=
@[rocq_alias embed_embed_sbi]
theorem embed_embed_sbi : @BiEmbedSbi QA QC _ _ (embedBiEmbed QB) _ _ :=
letI : BiEmbed QA QC := embedBiEmbed QB
{ embed_si_emp_valid := fun P =>
(BiEmbedSbi.embed_si_emp_valid (PROP1 := QB) (PROP2 := QC) (embed (A := QA) (B := QB) P)).trans
Expand Down
10 changes: 5 additions & 5 deletions Iris/Iris/BI/MonPred.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ section BigOp
open Iris.Algebra Iris.Algebra.BigOpL Iris.Algebra.BigOpM
open Iris.BI.BigSepL Iris.BI.BigSepM Iris.BI.BigSepS

@[reducible] def monPred_at_hom {op₁ : MonPred I PROP → MonPred I PROP → MonPred I PROP}
theorem monPred_at_hom {op₁ : MonPred I PROP → MonPred I PROP → MonPred I PROP}
{op₂ : PROP → PROP → PROP} {u₁ : MonPred I PROP} {u₂ : PROP}
[MonoidOps op₁ u₁] [MonoidOps op₂ u₂] (i : I.car)
(hop : ∀ {x y}, (op₁ x y).monPred_at i ≡ op₂ (x.monPred_at i) (y.monPred_at i))
Expand Down Expand Up @@ -1337,8 +1337,8 @@ instance monPred_objectively_monoid_sep_entails_homomorphism :
map_op := fun {x y} => monPred_objectively_sep_2 x y
map_unit := monPred_objectively_emp.mpr

@[reducible, rocq_alias monPred_objectively_monoid_sep_homomorphism]
def monPred_objectively_monoid_sep_homomorphism {bot : I.car} [BiIndexBottom I bot] :
@[rocq_alias monPred_objectively_monoid_sep_homomorphism]
theorem monPred_objectively_monoid_sep_homomorphism {bot : I.car} [BiIndexBottom I bot] :
MonoidHomomorphism (BIBase.sep (PROP := MonPred I PROP)) BIBase.sep BIBase.emp BIBase.emp
(· ≡ ·) MonPred.objectively :=
MonoidHomomorphism.ofEquiv monPred_objectively_ne
Expand Down Expand Up @@ -1560,8 +1560,8 @@ instance monPred_subjectively_plain (P : MonPred I PROP) [Plain P] :

/-! ### `SbiEmpValidExist` for `MonPred` -/

@[reducible, rocq_alias monPred_sbi_emp_valid_exist]
def monPred_sbi_emp_valid_exist {bot : I.car} [BiIndexBottom I bot] [SbiEmpValidExist PROP] :
@[rocq_alias monPred_sbi_emp_valid_exist]
theorem monPred_sbi_emp_valid_exist {bot : I.car} [BiIndexBottom I bot] [SbiEmpValidExist PROP] :
SbiEmpValidExist (MonPred I PROP) where
siEmpValid_sExists_1 Ψ := by
refine (siEmpValid_mono (forall_elim bot)).trans ?_
Expand Down
6 changes: 3 additions & 3 deletions Iris/Iris/Instances/IProp/Instance.lean
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abbrev BundledGFunctors.api (FF : BundledGFunctors) (τ : GType) (T : Type _) [C
FF τ |>.fst |>.ap T

/-- Transport an OFunctorPre application along equality of the OFunctorPre. -/
def transpAp {F1 F2 : OFunctorPre} (H : F1 = F2) {T} [COFE T] : F1.ap T = F2.ap T :=
theorem transpAp {F1 F2 : OFunctorPre} (H : F1 = F2) {T} [COFE T] : F1.ap T = F2.ap T :=
congrArg (OFunctorPre.ap · T) H

section TranspAp
Expand Down Expand Up @@ -71,10 +71,10 @@ open OFE

variable [I : RFunctorContractive F]

def ElemG.transpMap (E : ElemG GF F) T [OFE T] : (GF E.τ).fst = F :=
theorem ElemG.transpMap (E : ElemG GF F) T [OFE T] : (GF E.τ).fst = F :=
Sigma.mk.inj E.transp |>.1

def ElemG.transpClass (E : ElemG GF F) T [OFE T] : (GF E.τ).snd ≍ I :=
theorem ElemG.transpClass (E : ElemG GF F) T [OFE T] : (GF E.τ).snd ≍ I :=
Sigma.mk.inj E.transp |>.2

def ElemG.bundle (E : ElemG GF F) [COFE T] : F.ap T → GF.api E.τ T :=
Expand Down
4 changes: 2 additions & 2 deletions Iris/Iris/ProgramLogic/EctxLanguage.lean
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ theorem primStep_stuck_of_baseStep_stuck :
BaseStep.Stuck (e, σ) → SubredexesAreValues e → PrimStep.Stuck (e, σ) :=
fun ⟨toVal_none, irr⟩ hsr => ⟨toVal_none, primStep_irreducible_of_baseStep_irreducible irr hsr⟩

@[rocq_alias ectx_language_atomic, implicit_reducible]
def Atomic.ofBaseAtomic (a : Language.Atomicity) :
@[rocq_alias ectx_language_atomic]
theorem Atomic.ofBaseAtomic (a : Language.Atomicity) :
BaseAtomic a e →
SubredexesAreValues e →
Language.Atomic a e := fun _ _ => ⟨by grind [BaseAtomic]⟩
Expand Down
2 changes: 1 addition & 1 deletion Iris/Iris/ProgramLogic/Language.lean
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ end Notation

open Notation

def Step.of_primStep {e σ} {obs : List Obs} {e'} {σ' : State} {eₜ}
theorem Step.of_primStep {e σ} {obs : List Obs} {e'} {σ' : State} {eₜ}
(H : (e, σ) -<obs>-> (e', σ', eₜ)) {t₁ t₂: List Expr} :
Step (t₁ ++ e :: t₂, σ) obs (t₁ ++ e' :: t₂ ++ eₜ, σ') :=
atomic H ..
Expand Down
2 changes: 1 addition & 1 deletion Iris/Iris/ProgramLogic/WeakestPre.lean
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ theorem wp_bind (K : Expr → Expr) [κ : Language.Context K] {s : Stuckness} {E
WP e @ s ; E {{v, WP (K (↑v : Val)) @ s ; E {{ Φ }} }} ⊢ WP (K e) @ s ; E {{ Φ }} := (wp_bind_iff K).1

@[rocq_alias wp_bind_inv]
def wp_bind_inv (K : Expr → Expr) [κ : Language.Context K] {s : Stuckness} {E : CoPset} {e : Expr}
theorem wp_bind_inv (K : Expr → Expr) [κ : Language.Context K] {s : Stuckness} {E : CoPset} {e : Expr}
{Φ : Val → IProp GF} :
WP (K e) @ s ; E {{ Φ }} ⊢ WP e @ s ; E {{v, WP (K (↑v : Val)) @ s ; E {{ Φ }} }} := (wp_bind_iff K).2

Expand Down
9 changes: 5 additions & 4 deletions Iris/Iris/ProofMode/Tactics/Combine.lean
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ private def CombineState.combineProofModeHyp {u prop bi origE goal} :
-- Type class instance search for the `as` syntax
let newOutAs ← mkFreshExprMVarQ q($prop)
let instAs ← ProofModeM.synthInstanceQ q(CombineSepAs $out2 $outAs $newOutAs)
have : ($(conj p1 p2)) =Q ($p1 && $p2) := ⟨⟩
let newPfAs := q(combine_as_step $instAs $pfAs $(pf2).mp)

match outGives, pfGives with
Expand Down Expand Up @@ -246,9 +247,9 @@ elab "icombine " patSels:(colGt ppSpace selPat)*

ProofModeM.runTactic λ mvar { hyps, goal, .. } => do
let hs ← iCombineParseSelPats hyps patSels
let st ← iCombineCore hs hyps goal
let {outGives, pfGives, ..} ← iCombineCore hs hyps goal

match st.outGives, st.pfGives with
match outGives, pfGives with
| some outGives, pfGives =>
let pf ← iCasesCore _ hyps goal pat q(true) outGives addBIGoal
mvar.assign q($(pfGives).trans $pf)
Expand All @@ -275,9 +276,9 @@ elab "icombine " patSels:(colGt ppSpace selPat)*

ProofModeM.runTactic λ mvar { hyps, goal, .. } => do
let hs ← iCombineParseSelPats hyps patSels
let st ← iCombineCore hs hyps goal
let st@{outGives, pfGives, ..} ← iCombineCore hs hyps goal

match st.outGives, st.pfGives with
match outGives, pfGives with
| some outGives, pfGives =>
let pf ← iCasesCore _ st.newHyps goal (.conjunction [pat1, .intuitionistic pat2])
q($st.p) q(iprop($st.outAs ∗ □ $outGives)) addBIGoal
Expand Down
3 changes: 1 addition & 2 deletions Iris/Iris/Std/List.lean
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ theorem nodup_map_of_injective {B : Type _} {f : A → B} {l : List A}
cases hinj heq.symm
exact hnodup.1 hy

@[expose, match_pattern]
def Forall₂.append {l₁ l₁' l₂ l₂'} : List.Forall₂ R l₁ l₂ → List.Forall₂ R l₁' l₂' → List.Forall₂ R (l₁ ++ l₁') (l₂ ++ l₂')
theorem Forall₂.append {l₁ l₁' l₂ l₂'} : List.Forall₂ R l₁ l₂ → List.Forall₂ R l₁' l₂' → List.Forall₂ R (l₁ ++ l₁') (l₂ ++ l₂')
| .nil, h => h
| .cons step rest, h => .cons step (append rest h)

Expand Down
3 changes: 2 additions & 1 deletion Iris/Iris/Std/PartialMap.lean
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def difference (m₁ m₂ : M V) : M V :=
def zipWith (f : V → V' → V'') (m₁ : M V) (m₂ : M V') : M V'' :=
bindAlter (fun k v => (get? m₂ k).bind fun v' => some <| f v v') m₁

set_option linter.checkUnivs false in
def zip (m₁ : M V) (m₂ : M V') : M (V × V') :=
zipWith (fun x y => (x, y)) m₁ m₂

Expand All @@ -167,7 +168,7 @@ theorem equiv.trans : ∀ {a b c : M V}, equiv a b → equiv b c → equiv a c :
/-- Pointwise equivalence is transitive. -/
instance instEquivTrans : Trans equiv (@equiv K V M _) equiv := ⟨equiv.trans⟩

@[simp] def equiv.symm : ∀ (a b : M V), equiv a b → equiv b a :=
@[simp] theorem equiv.symm : ∀ (a b : M V), equiv a b → equiv b a :=
fun _ _ h k => (h k).symm

instance instEquivSymm : Std.Symm (@equiv K V M _) := ⟨equiv.symm⟩
Expand Down
8 changes: 4 additions & 4 deletions Iris/Iris/Std/Positives.lean
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ theorem flatten_suffix (l k : List Pos) : l <:+ k -> ∃ q, flatten k = q ++ fla
rintro ⟨l', rfl⟩
exact ⟨_, flatten_app⟩

def app_inj (p : Pos) : (· ++ p).Injective :=
theorem app_inj (p : Pos) : (· ++ p).Injective :=
fun a a' Heq => by induction p <;> simp_all [HAppend.hAppend, app]

theorem reverse_involutive p : reverse (reverse p) = p := by
Expand All @@ -358,7 +358,7 @@ theorem reverse_involutive p : reverse (reverse p) = p := by
| xO p IH => rewrite [reverse_x0, reverse_app, IH]; rfl
| xH => rfl

def rev_inj : reverse.Injective :=
theorem rev_inj : reverse.Injective :=
fun p q Heq => by
rewrite [<- reverse_involutive p, <- reverse_involutive q]
simp [Heq]
Expand Down Expand Up @@ -410,10 +410,10 @@ class Countable (A : Type) where
decode : Pos -> Option A
decode_encode x : decode (encode x) = some x

def some_inj {A} : (@some A).Injective :=
theorem some_inj {A} : (@some A).Injective :=
fun _ _ => by rintro ⟨⟩; rfl

def encode_inj [c : Countable A] : c.encode.Injective :=
theorem encode_inj [c : Countable A] : c.encode.Injective :=
fun x _ Hxy => by
apply some_inj
rewrite [<- c.decode_encode x, Hxy, c.decode_encode]
Expand Down
1 change: 1 addition & 0 deletions Iris/Iris/Std/Prod.lean
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module

namespace Prod

set_option linter.checkUnivs false in
/-- Apply `f` to all elements of a tuple. All elements of the tuple must have the same type `α`. -/
def mapAllM [Monad M] (f : α → M β) : α × α → M (β × β)
| (x, y) => do return (← f x, ← f y)
Expand Down
8 changes: 4 additions & 4 deletions Iris/lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "fa08db58b30eb033edcdab331bba000827f9f785",
"rev": "023ce7d62a0531e22a5331e20b587817a80d49ff",
"name": "batteries",
"manifestFile": "lake-manifest.json",
"inputRev": "v4.31.0",
"inputRev": "v4.32.0",
"inherited": false,
"configFile": "lakefile.toml"},
{"url": "https://github.com/leanprover-community/quote4",
"type": "git",
"subDir": null,
"scope": "leanprover-community",
"rev": "f46324995fca5f0483b742e4eb4daec7f4ee50d2",
"rev": "38d591e778f100aec9762bb582f9c7f55f50e9dc",
"name": "Qq",
"manifestFile": "lake-manifest.json",
"inputRev": "v4.31.0",
"inputRev": "v4.32.0",
"inherited": false,
"configFile": "lakefile.toml"}],
"name": "iris",
Expand Down
4 changes: 2 additions & 2 deletions Iris/lakefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ defaultTargets = ["Iris", "IrisTest"]
[[require]]
name = "Qq"
scope = "leanprover-community"
rev = "v4.31.0"
rev = "v4.32.0"

[[require]]
name = "batteries"
scope = "leanprover-community"
rev = "v4.31.0"
rev = "v4.32.0"

[[lean_lib]]
name = "Iris"
Expand Down
2 changes: 1 addition & 1 deletion Iris/lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.31.0
leanprover/lean4:v4.32.0