ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- USize.nsmul_def
run_cmd
  for typeName' in [`UInt8, `UInt16, `UInt32, `UInt64, `USize] do
  let typeName := Lean.mkIdent typeName'
  Lean.Elab.Command.elabCommand (← `(
    namespace $typeName
      instance neZero : NeZero size := ⟨by decide⟩

      instance : Neg $typeName where
        neg a := mk (-a.val)

      instance : Pow $typeName ℕ where
        pow a n := mk (a.val ^ n)

      instance : SMul ℕ $typeName where
        smul n a := mk (n • a.val)

      instance : SMul ℤ $typeName where
        smul z a := mk (z • a.val)

      lemma neg_def (a : $typeName) : -a = ⟨-a.val⟩ := rfl

      lemma pow_def (a : $typeName) (n : ℕ) : a ^ n = ⟨a.val ^ n⟩ := rfl

      lemma nsmul_def (n : ℕ) (a : $typeName) : n • a = ⟨n • a.val⟩ := rfl

      lemma zsmul_def (z : ℤ) (a : $typeName) : z • a = ⟨z • a.val⟩ := rfl

      open $typeName (eq_of_val_eq) in
      lemma val_injective : Function.Injective val := @eq_of_val_eq

      instance instCommMonoid : CommMonoid $typeName :=
        Function.Injective.commMonoid val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl)

      instance instNonUnitalCommRing : NonUnitalCommRing $typeName :=
        Function.Injective.nonUnitalCommRing val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl)

      local instance instNatCast : NatCast $typeName where
        natCast n := mk n

      local instance instIntCast : IntCast $typeName where
        intCast z := mk z

      lemma natCast_def (n : ℕ) : (n : $typeName) = ⟨n⟩ := rfl

      lemma intCast_def (z : ℤ) : (z : $typeName) = ⟨z⟩ := rfl

      local instance instCommRing : CommRing $typeName :=
        Function.Injective.commRing val val_injective
          rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)

      namespace CommRing
      attribute [scoped instance] instCommRing instNatCast instIntCast
      end CommRing

    end $typeName
  ))
  -- interpolating docstrings above is more trouble than it's worth
  let docString :=
    s!"To use this instance, use `open scoped {typeName'}.CommRing`.\n\n" ++
    "See the module docstring for an explanation"
  Lean.addDocString (typeName'.mkStr "instCommRing") docString
  Lean.addDocString (typeName'.mkStr "instNatCast") docString
  Lean.addDocString (typeName'.mkStr "instIntCast") docString
Arguments: (n : ℕ) (a : USize)
Goal: n • a = { val := n • a.val }
-- USize.natCast_def
run_cmd
  for typeName' in [`UInt8, `UInt16, `UInt32, `UInt64, `USize] do
  let typeName := Lean.mkIdent typeName'
  Lean.Elab.Command.elabCommand (← `(
    namespace $typeName
      instance neZero : NeZero size := ⟨by decide⟩

      instance : Neg $typeName where
        neg a := mk (-a.val)

      instance : Pow $typeName ℕ where
        pow a n := mk (a.val ^ n)

      instance : SMul ℕ $typeName where
        smul n a := mk (n • a.val)

      instance : SMul ℤ $typeName where
        smul z a := mk (z • a.val)

      lemma neg_def (a : $typeName) : -a = ⟨-a.val⟩ := rfl

      lemma pow_def (a : $typeName) (n : ℕ) : a ^ n = ⟨a.val ^ n⟩ := rfl

      lemma nsmul_def (n : ℕ) (a : $typeName) : n • a = ⟨n • a.val⟩ := rfl

      lemma zsmul_def (z : ℤ) (a : $typeName) : z • a = ⟨z • a.val⟩ := rfl

      open $typeName (eq_of_val_eq) in
      lemma val_injective : Function.Injective val := @eq_of_val_eq

      instance instCommMonoid : CommMonoid $typeName :=
        Function.Injective.commMonoid val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl)

      instance instNonUnitalCommRing : NonUnitalCommRing $typeName :=
        Function.Injective.nonUnitalCommRing val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl)

      local instance instNatCast : NatCast $typeName where
        natCast n := mk n

      local instance instIntCast : IntCast $typeName where
        intCast z := mk z

      lemma natCast_def (n : ℕ) : (n : $typeName) = ⟨n⟩ := rfl

      lemma intCast_def (z : ℤ) : (z : $typeName) = ⟨z⟩ := rfl

      local instance instCommRing : CommRing $typeName :=
        Function.Injective.commRing val val_injective
          rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)

      namespace CommRing
      attribute [scoped instance] instCommRing instNatCast instIntCast
      end CommRing

    end $typeName
  ))
  -- interpolating docstrings above is more trouble than it's worth
  let docString :=
    s!"To use this instance, use `open scoped {typeName'}.CommRing`.\n\n" ++
    "See the module docstring for an explanation"
  Lean.addDocString (typeName'.mkStr "instCommRing") docString
  Lean.addDocString (typeName'.mkStr "instNatCast") docString
  Lean.addDocString (typeName'.mkStr "instIntCast") docString
Arguments: (n : ℕ)
Goal: ↑n = { val := ↑n }
-- UInt32.zsmul_def
run_cmd
  for typeName' in [`UInt8, `UInt16, `UInt32, `UInt64, `USize] do
  let typeName := Lean.mkIdent typeName'
  Lean.Elab.Command.elabCommand (← `(
    namespace $typeName
      instance neZero : NeZero size := ⟨by decide⟩

      instance : Neg $typeName where
        neg a := mk (-a.val)

      instance : Pow $typeName ℕ where
        pow a n := mk (a.val ^ n)

      instance : SMul ℕ $typeName where
        smul n a := mk (n • a.val)

      instance : SMul ℤ $typeName where
        smul z a := mk (z • a.val)

      lemma neg_def (a : $typeName) : -a = ⟨-a.val⟩ := rfl

      lemma pow_def (a : $typeName) (n : ℕ) : a ^ n = ⟨a.val ^ n⟩ := rfl

      lemma nsmul_def (n : ℕ) (a : $typeName) : n • a = ⟨n • a.val⟩ := rfl

      lemma zsmul_def (z : ℤ) (a : $typeName) : z • a = ⟨z • a.val⟩ := rfl

      open $typeName (eq_of_val_eq) in
      lemma val_injective : Function.Injective val := @eq_of_val_eq

      instance instCommMonoid : CommMonoid $typeName :=
        Function.Injective.commMonoid val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl)

      instance instNonUnitalCommRing : NonUnitalCommRing $typeName :=
        Function.Injective.nonUnitalCommRing val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl)

      local instance instNatCast : NatCast $typeName where
        natCast n := mk n

      local instance instIntCast : IntCast $typeName where
        intCast z := mk z

      lemma natCast_def (n : ℕ) : (n : $typeName) = ⟨n⟩ := rfl

      lemma intCast_def (z : ℤ) : (z : $typeName) = ⟨z⟩ := rfl

      local instance instCommRing : CommRing $typeName :=
        Function.Injective.commRing val val_injective
          rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)

      namespace CommRing
      attribute [scoped instance] instCommRing instNatCast instIntCast
      end CommRing

    end $typeName
  ))
  -- interpolating docstrings above is more trouble than it's worth
  let docString :=
    s!"To use this instance, use `open scoped {typeName'}.CommRing`.\n\n" ++
    "See the module docstring for an explanation"
  Lean.addDocString (typeName'.mkStr "instCommRing") docString
  Lean.addDocString (typeName'.mkStr "instNatCast") docString
  Lean.addDocString (typeName'.mkStr "instIntCast") docString
Arguments: (z : ℤ) (a : UInt32)
Goal: z • a = { val := z • a.val }
-- UInt64.intCast_def
run_cmd
  for typeName' in [`UInt8, `UInt16, `UInt32, `UInt64, `USize] do
  let typeName := Lean.mkIdent typeName'
  Lean.Elab.Command.elabCommand (← `(
    namespace $typeName
      instance neZero : NeZero size := ⟨by decide⟩

      instance : Neg $typeName where
        neg a := mk (-a.val)

      instance : Pow $typeName ℕ where
        pow a n := mk (a.val ^ n)

      instance : SMul ℕ $typeName where
        smul n a := mk (n • a.val)

      instance : SMul ℤ $typeName where
        smul z a := mk (z • a.val)

      lemma neg_def (a : $typeName) : -a = ⟨-a.val⟩ := rfl

      lemma pow_def (a : $typeName) (n : ℕ) : a ^ n = ⟨a.val ^ n⟩ := rfl

      lemma nsmul_def (n : ℕ) (a : $typeName) : n • a = ⟨n • a.val⟩ := rfl

      lemma zsmul_def (z : ℤ) (a : $typeName) : z • a = ⟨z • a.val⟩ := rfl

      open $typeName (eq_of_val_eq) in
      lemma val_injective : Function.Injective val := @eq_of_val_eq

      instance instCommMonoid : CommMonoid $typeName :=
        Function.Injective.commMonoid val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl)

      instance instNonUnitalCommRing : NonUnitalCommRing $typeName :=
        Function.Injective.nonUnitalCommRing val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl)

      local instance instNatCast : NatCast $typeName where
        natCast n := mk n

      local instance instIntCast : IntCast $typeName where
        intCast z := mk z

      lemma natCast_def (n : ℕ) : (n : $typeName) = ⟨n⟩ := rfl

      lemma intCast_def (z : ℤ) : (z : $typeName) = ⟨z⟩ := rfl

      local instance instCommRing : CommRing $typeName :=
        Function.Injective.commRing val val_injective
          rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)

      namespace CommRing
      attribute [scoped instance] instCommRing instNatCast instIntCast
      end CommRing

    end $typeName
  ))
  -- interpolating docstrings above is more trouble than it's worth
  let docString :=
    s!"To use this instance, use `open scoped {typeName'}.CommRing`.\n\n" ++
    "See the module docstring for an explanation"
  Lean.addDocString (typeName'.mkStr "instCommRing") docString
  Lean.addDocString (typeName'.mkStr "instNatCast") docString
  Lean.addDocString (typeName'.mkStr "instIntCast") docString
Arguments: (z : ℤ)
Goal: ↑z = { val := ↑z }
-- UInt16.intCast_def
run_cmd
  for typeName' in [`UInt8, `UInt16, `UInt32, `UInt64, `USize] do
  let typeName := Lean.mkIdent typeName'
  Lean.Elab.Command.elabCommand (← `(
    namespace $typeName
      instance neZero : NeZero size := ⟨by decide⟩

      instance : Neg $typeName where
        neg a := mk (-a.val)

      instance : Pow $typeName ℕ where
        pow a n := mk (a.val ^ n)

      instance : SMul ℕ $typeName where
        smul n a := mk (n • a.val)

      instance : SMul ℤ $typeName where
        smul z a := mk (z • a.val)

      lemma neg_def (a : $typeName) : -a = ⟨-a.val⟩ := rfl

      lemma pow_def (a : $typeName) (n : ℕ) : a ^ n = ⟨a.val ^ n⟩ := rfl

      lemma nsmul_def (n : ℕ) (a : $typeName) : n • a = ⟨n • a.val⟩ := rfl

      lemma zsmul_def (z : ℤ) (a : $typeName) : z • a = ⟨z • a.val⟩ := rfl

      open $typeName (eq_of_val_eq) in
      lemma val_injective : Function.Injective val := @eq_of_val_eq

      instance instCommMonoid : CommMonoid $typeName :=
        Function.Injective.commMonoid val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl)

      instance instNonUnitalCommRing : NonUnitalCommRing $typeName :=
        Function.Injective.nonUnitalCommRing val val_injective
          rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl)

      local instance instNatCast : NatCast $typeName where
        natCast n := mk n

      local instance instIntCast : IntCast $typeName where
        intCast z := mk z

      lemma natCast_def (n : ℕ) : (n : $typeName) = ⟨n⟩ := rfl

      lemma intCast_def (z : ℤ) : (z : $typeName) = ⟨z⟩ := rfl

      local instance instCommRing : CommRing $typeName :=
        Function.Injective.commRing val val_injective
          rfl rfl (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl)
          (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ => rfl) (fun _ => rfl)

      namespace CommRing
      attribute [scoped instance] instCommRing instNatCast instIntCast
      end CommRing

    end $typeName
  ))
  -- interpolating docstrings above is more trouble than it's worth
  let docString :=
    s!"To use this instance, use `open scoped {typeName'}.CommRing`.\n\n" ++
    "See the module docstring for an explanation"
  Lean.addDocString (typeName'.mkStr "instCommRing") docString
  Lean.addDocString (typeName'.mkStr "instNatCast") docString
  Lean.addDocString (typeName'.mkStr "instIntCast") docString
Arguments: (z : ℤ)
Goal: ↑z = { val := ↑z }
-- Multiset.coe_keys
@[simp]
theorem coe_keys {l : List (Sigma β)} : keys (l : Multiset (Sigma β)) = (l.keys : Multiset α) 
Arguments: {α : Type u} {β : α → Type v} {l : List (Sigma β)}
Goal: (↑l).keys = ↑l.keys
-- Multiset.coe_nodupKeys
@[simp]
theorem coe_nodupKeys {l : List (Sigma β)} : @NodupKeys α β l ↔ l.NodupKeys 
Arguments: {α : Type u} {β : α → Type v} {l : List (Sigma β)}
Goal: (↑l).NodupKeys ↔ l.NodupKeys
-- Multiset.nodup_keys
lemma nodup_keys {m : Multiset (Σ a, β a)} : m.keys.Nodup ↔ m.NodupKeys 
Arguments: {α : Type u} {β : α → Type v} {m : Multiset ((a : α) × β a)}
Goal: m.keys.Nodup ↔ m.NodupKeys
-- Multiset.NodupKeys.nodup
protected lemma NodupKeys.nodup {m : Multiset (Σ a, β a)} (h : m.NodupKeys) : m.Nodup 
Arguments: {α : Type u} {β : α → Type v} {m : Multiset ((a : α) × β a)} (h : m.NodupKeys)
Goal: m.Nodup
-- Finmap.nodupKeys
structure Finmap (β : α → Type v) : Type max u v where
    entries : Multiset (Sigma β)
    nodupKeys : entries.NodupKeys
Arguments: {α : Type u} {β : α → Type v} (self : Finmap β)
Goal: self.entries.NodupKeys
-- AList.toFinmap_eq
theorem AList.toFinmap_eq {s₁ s₂ : AList β} :
    toFinmap s₁ = toFinmap s₂ ↔ s₁.entries ~ s₂.entries 
Arguments: {α : Type u} {β : α → Type v} {s₁ s₂ : AList β}
Goal: ⟦s₁⟧ = ⟦s₂⟧ ↔ s₁.entries ~ s₂.entries
-- AList.toFinmap_entries
@[simp]
theorem AList.toFinmap_entries (s : AList β) : ⟦s⟧.entries = s.entries 
Arguments: {α : Type u} {β : α → Type v} (s : AList β)
Goal: ⟦s⟧.entries = ↑s.entries
-- Finmap.nodup_entries
lemma nodup_entries (f : Finmap β) : f.entries.Nodup 
Arguments: {α : Type u} {β : α → Type v} (f : Finmap β)
Goal: f.entries.Nodup
-- Finmap.liftOn_toFinmap
@[simp]
theorem liftOn_toFinmap {γ} (s : AList β) (f : AList β → γ) (H) : liftOn ⟦s⟧ f H = f s 
Arguments: {α : Type u} {β : α → Type v} {γ : Type u_1} (s : AList β) (f : AList β → γ) (H : ∀ (a b : AList β), a.entries ~ b.entries → f a = f b)
Goal: ⟦s⟧.liftOn f H = f s
-- Finmap.liftOn₂_toFinmap
@[simp]
theorem liftOn₂_toFinmap {γ} (s₁ s₂ : AList β) (f : AList β → AList β → γ) (H) :
    liftOn₂ ⟦s₁⟧ ⟦s₂⟧ f H = f s₁ s₂ 
Arguments: {α : Type u} {β : α → Type v} {γ : Type u_1} (s₁ s₂ : AList β) (f : AList β → AList β → γ) (H : ∀ (a₁ b₁ a₂ b₂ : AList β), a₁.entries ~ a₂.entries → b₁.entries ~ b₂.entries → f a₁ b₁ = f a₂ b₂)
Goal: ⟦s₁⟧.liftOn₂ ⟦s₂⟧ f H = f s₁ s₂
-- Finmap.induction_on
@[elab_as_elim]
theorem induction_on {C : Finmap β → Prop} (s : Finmap β) (H : ∀ a : AList β, C ⟦a⟧) : C s 
Arguments: {α : Type u} {β : α → Type v} {C : Finmap β → Prop} (s : Finmap β) (H : ∀ (a : AList β), C ⟦a⟧)
Goal: C s
-- Finmap.induction_on₂
@[elab_as_elim]
theorem induction_on₂ {C : Finmap β → Finmap β → Prop} (s₁ s₂ : Finmap β)
    (H : ∀ a₁ a₂ : AList β, C ⟦a₁⟧ ⟦a₂⟧) : C s₁ s₂ 
Arguments: {α : Type u} {β : α → Type v} {C : Finmap β → Finmap β → Prop} (s₁ s₂ : Finmap β) (H : ∀ (a₁ a₂ : AList β), C ⟦a₁⟧ ⟦a₂⟧)
Goal: C s₁ s₂
-- Finmap.induction_on₃
@[elab_as_elim]
theorem induction_on₃ {C : Finmap β → Finmap β → Finmap β → Prop} (s₁ s₂ s₃ : Finmap β)
    (H : ∀ a₁ a₂ a₃ : AList β, C ⟦a₁⟧ ⟦a₂⟧ ⟦a₃⟧) : C s₁ s₂ s₃ 
Arguments: {α : Type u} {β : α → Type v} {C : Finmap β → Finmap β → Finmap β → Prop} (s₁ s₂ s₃ : Finmap β) (H : ∀ (a₁ a₂ a₃ : AList β), C ⟦a₁⟧ ⟦a₂⟧ ⟦a₃⟧)
Goal: C s₁ s₂ s₃
-- Finmap.ext
@[ext]
theorem ext : ∀ {s t : Finmap β}, s.entries = t.entries → s = t
  
Arguments: {α : Type u} {β : α → Type v} {s t : Finmap β}
Goal: s.entries = t.entries → s = t
-- Finmap.ext_iff
protected theorem ext_iff {s t : Finmap β} : s = t ↔ s.entries = t.entries 
Arguments: {α : Type u} {β : α → Type v} {s t : Finmap β}
Goal: s = t ↔ s.entries = t.entries
-- Finmap.ext_iff'
@[simp]
theorem ext_iff' {s t : Finmap β} : s.entries = t.entries ↔ s = t 
Arguments: {α : Type u} {β : α → Type v} {s t : Finmap β}
Goal: s.entries = t.entries ↔ s = t
-- Finmap.mem_def
theorem mem_def {a : α} {s : Finmap β} : a ∈ s ↔ a ∈ s.entries.keys 
Arguments: {α : Type u} {β : α → Type v} {a : α} {s : Finmap β}
Goal: a ∈ s ↔ a ∈ s.entries.keys
-- Finmap.mem_toFinmap
@[simp]
theorem mem_toFinmap {a : α} {s : AList β} : a ∈ toFinmap s ↔ a ∈ s 
Arguments: {α : Type u} {β : α → Type v} {a : α} {s : AList β}
Goal: a ∈ ⟦s⟧ ↔ a ∈ s
-- Finmap.keys_val
@[simp]
theorem keys_val (s : AList β) : (keys ⟦s⟧).val = s.keys 
Arguments: {α : Type u} {β : α → Type v} (s : AList β)
Goal: ⟦s⟧.keys.val = ↑s.keys
-- Finmap.keys_ext
@[simp]
theorem keys_ext {s₁ s₂ : AList β} : keys ⟦s₁⟧ = keys ⟦s₂⟧ ↔ s₁.keys ~ s₂.keys 
Arguments: {α : Type u} {β : α → Type v} {s₁ s₂ : AList β}
Goal: ⟦s₁⟧.keys = ⟦s₂⟧.keys ↔ s₁.keys ~ s₂.keys
-- Finmap.mem_keys
theorem mem_keys {a : α} {s : Finmap β} : a ∈ s.keys ↔ a ∈ s 
Arguments: {α : Type u} {β : α → Type v} {a : α} {s : Finmap β}
Goal: a ∈ s.keys ↔ a ∈ s
-- Finmap.empty_toFinmap
@[simp]
theorem empty_toFinmap : (⟦∅⟧ : Finmap β) = ∅ 
Arguments: {α : Type u} {β : α → Type v}
Goal: ⟦∅⟧ = ∅
-- Finmap.toFinmap_nil
@[simp]
theorem toFinmap_nil [DecidableEq α] : ([].toFinmap : Finmap β) = ∅ 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α]
Goal: [].toFinmap = ∅
-- Finmap.not_mem_empty
theorem not_mem_empty {a : α} : a ∉ (∅ : Finmap β) 
Arguments: {α : Type u} {β : α → Type v} {a : α}
Goal: a ∉ ∅
-- Finmap.keys_empty
@[simp]
theorem keys_empty : (∅ : Finmap β).keys = ∅ 
Arguments: {α : Type u} {β : α → Type v}
Goal: ∅.keys = ∅
-- Finmap.keys_singleton
@[simp]
theorem keys_singleton (a : α) (b : β a) : (singleton a b).keys = {a} 
Arguments: {α : Type u} {β : α → Type v} (a : α) (b : β a)
Goal: (Finmap.singleton a b).keys = {a}
-- Finmap.mem_singleton
@[simp]
theorem mem_singleton (x y : α) (b : β y) : x ∈ singleton y b ↔ x = y 
Arguments: {α : Type u} {β : α → Type v} (x y : α) (b : β y)
Goal: x ∈ Finmap.singleton y b ↔ x = y
-- Finmap.lookup_toFinmap
@[simp]
theorem lookup_toFinmap (a : α) (s : AList β) : lookup a ⟦s⟧ = s.lookup a 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (a : α) (s : AList β)
Goal: Finmap.lookup a ⟦s⟧ = AList.lookup a s
-- Finmap.dlookup_list_toFinmap
@[simp]
theorem dlookup_list_toFinmap (a : α) (s : List (Sigma β)) : lookup a s.toFinmap = s.dlookup a 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (a : α) (s : List (Sigma β))
Goal: Finmap.lookup a s.toFinmap = List.dlookup a s
-- Finmap.lookup_empty
@[simp]
theorem lookup_empty (a) : lookup a (∅ : Finmap β) = none 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (a : α)
Goal: Finmap.lookup a ∅ = none
-- Finmap.lookup_isSome
theorem lookup_isSome {a : α} {s : Finmap β} : (s.lookup a).isSome ↔ a ∈ s 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] {a : α} {s : Finmap β}
Goal: (Finmap.lookup a s).isSome = true ↔ a ∈ s
-- Finmap.lookup_eq_none
theorem lookup_eq_none {a} {s : Finmap β} : lookup a s = none ↔ a ∉ s 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] {a : α} {s : Finmap β}
Goal: Finmap.lookup a s = none ↔ a ∉ s
-- Finmap.mem_lookup_iff
lemma mem_lookup_iff {s : Finmap β} {a : α} {b : β a} :
    b ∈ s.lookup a ↔ Sigma.mk a b ∈ s.entries 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] {s : Finmap β} {a : α} {b : β a}
Goal: b ∈ Finmap.lookup a s ↔ ⟨a, b⟩ ∈ s.entries
-- Finmap.lookup_eq_some_iff
lemma lookup_eq_some_iff {s : Finmap β} {a : α} {b : β a} :
    s.lookup a = b ↔ Sigma.mk a b ∈ s.entries 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] {s : Finmap β} {a : α} {b : β a}
Goal: Finmap.lookup a s = some b ↔ ⟨a, b⟩ ∈ s.entries
-- Finmap.sigma_keys_lookup
@[simp] lemma sigma_keys_lookup (s : Finmap β) :
    s.keys.sigma (fun i => (s.lookup i).toFinset) = ⟨s.entries, s.nodup_entries⟩ 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (s : Finmap β)
Goal: (s.keys.sigma fun i => (Finmap.lookup i s).toFinset) = { val := s.entries, nodup := ⋯ }
-- Finmap.lookup_singleton_eq
@[simp]
theorem lookup_singleton_eq {a : α} {b : β a} : (singleton a b).lookup a = some b 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] {a : α} {b : β a}
Goal: Finmap.lookup a (Finmap.singleton a b) = some b
-- Finmap.mem_iff
theorem mem_iff {a : α} {s : Finmap β} : a ∈ s ↔ ∃ b, s.lookup a = some b 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] {a : α} {s : Finmap β}
Goal: a ∈ s ↔ ∃ b, Finmap.lookup a s = some b
-- Finmap.mem_of_lookup_eq_some
theorem mem_of_lookup_eq_some {a : α} {b : β a} {s : Finmap β} (h : s.lookup a = some b) : a ∈ s 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] {a : α} {b : β a} {s : Finmap β} (h : Finmap.lookup a s = some b)
Goal: a ∈ s
-- Finmap.ext_lookup
theorem ext_lookup {s₁ s₂ : Finmap β} : (∀ x, s₁.lookup x = s₂.lookup x) → s₁ = s₂ 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] {s₁ s₂ : Finmap β}
Goal: (∀ (x : α), Finmap.lookup x s₁ = Finmap.lookup x s₂) → s₁ = s₂
-- Finmap.keysLookupEquiv_apply_coe_fst
@[simps apply_coe_fst apply_coe_snd]
def keysLookupEquiv :
    Finmap β ≃ { f : Finset α × (∀ a, Option (β a)) // ∀ i, (f.2 i).isSome ↔ i ∈ f.1 } 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (s : Finmap β)
Goal: (↑(Finmap.keysLookupEquiv s)).1 = s.keys
-- Finmap.keysLookupEquiv_apply_coe_snd
@[simps apply_coe_fst apply_coe_snd]
def keysLookupEquiv :
    Finmap β ≃ { f : Finset α × (∀ a, Option (β a)) // ∀ i, (f.2 i).isSome ↔ i ∈ f.1 } 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (s : Finmap β) (i : α)
Goal: (↑(Finmap.keysLookupEquiv s)).2 i = Finmap.lookup i s
-- Finmap.keysLookupEquiv_symm_apply_keys
@[simp] lemma keysLookupEquiv_symm_apply_keys :
    ∀ f : {f : Finset α × (∀ a, Option (β a)) // ∀ i, (f.2 i).isSome ↔ i ∈ f.1},
      (keysLookupEquiv.symm f).keys = f.1.1 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (f : { f // ∀ (i : α), (f.2 i).isSome = true ↔ i ∈ f.1 })
Goal: (Finmap.keysLookupEquiv.symm f).keys = (↑f).1
-- Finmap.keysLookupEquiv_symm_apply_lookup
@[simp] lemma keysLookupEquiv_symm_apply_lookup :
    ∀ (f : {f : Finset α × (∀ a, Option (β a)) // ∀ i, (f.2 i).isSome ↔ i ∈ f.1}) a,
      (keysLookupEquiv.symm f).lookup a = f.1.2 a 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (f : { f // ∀ (i : α), (f.2 i).isSome = true ↔ i ∈ f.1 }) (a : α)
Goal: Finmap.lookup a (Finmap.keysLookupEquiv.symm f) = (↑f).2 a
-- Finmap.replace_toFinmap
@[simp]
theorem replace_toFinmap (a : α) (b : β a) (s : AList β) :
    replace a b ⟦s⟧ = (⟦s.replace a b⟧ : Finmap β) 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (a : α) (b : β a) (s : AList β)
Goal: Finmap.replace a b ⟦s⟧ = ⟦AList.replace a b s⟧
-- Finmap.keys_replace
@[simp]
theorem keys_replace (a : α) (b : β a) (s : Finmap β) : (replace a b s).keys = s.keys 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (a : α) (b : β a) (s : Finmap β)
Goal: (Finmap.replace a b s).keys = s.keys
-- Finmap.mem_replace
@[simp]
theorem mem_replace {a a' : α} {b : β a} {s : Finmap β} : a' ∈ replace a b s ↔ a' ∈ s 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] {a a' : α} {b : β a} {s : Finmap β}
Goal: a' ∈ Finmap.replace a b s ↔ a' ∈ s
-- Finmap.erase_toFinmap
@[simp]
theorem erase_toFinmap (a : α) (s : AList β) : erase a ⟦s⟧ = AList.toFinmap (s.erase a) 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (a : α) (s : AList β)
Goal: Finmap.erase a ⟦s⟧ = ⟦AList.erase a s⟧
-- Finmap.keys_erase_toFinset
@[simp]
theorem keys_erase_toFinset (a : α) (s : AList β) : keys ⟦s.erase a⟧ = (keys ⟦s⟧).erase a 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (a : α) (s : AList β)
Goal: ⟦AList.erase a s⟧.keys = ⟦s⟧.keys.erase a
-- Finmap.keys_erase
@[simp]
theorem keys_erase (a : α) (s : Finmap β) : (erase a s).keys = s.keys.erase a 
Arguments: {α : Type u} {β : α → Type v} [DecidableEq α] (a : α) (s : Finmap β)
Goal: (Finmap.erase a s).keys = s.keys.erase a