tasksource/leandojo huggingface dataset:
Theorem: CategoryTheory.Sieve.sieveOfSubfunctor_functorInclusion
File: Mathlib/CategoryTheory/Sites/Sieves.lean

tactic: ext
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y Z : C
f : Y ⟶ X
S R : Sieve X
⊢ sieveOfSubfunctor (functorInclusion S) = S

tactic: simp only [functorInclusion_app, sieveOfSubfunctor_apply]
state_before: case h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y Z : C
f : Y ⟶ X
S R : Sieve X
Y✝ : C
f✝ : Y✝ ⟶ X
⊢ (sieveOfSubfunctor (functorInclusion S)).arrows f✝ ↔ S.arrows f✝

tactic: constructor
state_before: case h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y Z : C
f : Y ⟶ X
S R : Sieve X
Y✝ : C
f✝ : Y✝ ⟶ X
⊢ (∃ t, ↑t = f✝) ↔ S.arrows f✝

tactic: rintro ⟨⟨f, hf⟩, rfl⟩
state_before: case h.mp
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y Z : C
f : Y ⟶ X
S R : Sieve X
Y✝ : C
f✝ : Y✝ ⟶ X
⊢ (∃ t, ↑t = f✝) → S.arrows f✝

tactic: exact hf
state_before: case h.mp.intro.mk
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y Z : C
f✝ : Y ⟶ X
S R : Sieve X
Y✝ : C
f : Y✝.op.unop ⟶ X
hf : S.arrows f
⊢ S.arrows ↑{ val := f, property := hf }

tactic: intro hf
state_before: case h.mpr
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y Z : C
f : Y ⟶ X
S R : Sieve X
Y✝ : C
f✝ : Y✝ ⟶ X
⊢ S.arrows f✝ → ∃ t, ↑t = f✝

tactic: exact ⟨⟨_, hf⟩, rfl⟩
state_before: case h.mpr
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
X Y Z : C
f : Y ⟶ X
S R : Sieve X
Y✝ : C
f✝ : Y✝ ⟶ X
hf : S.arrows f✝
⊢ ∃ t, ↑t = f✝
Theorem: MeasureTheory.isLocallyFiniteMeasure_of_isFiniteMeasureOnCompacts
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: intro x
state_before: α : Type u_1
β : Type ?u.836440
γ : Type ?u.836443
δ : Type ?u.836446
ι : Type ?u.836449
R : Type ?u.836452
R' : Type ?u.836455
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
inst✝² : TopologicalSpace α
inst✝¹ : LocallyCompactSpace α
inst✝ : IsFiniteMeasureOnCompacts μ
⊢ ∀ (x : α), FiniteAtFilter μ (𝓝 x)

tactic: rcases exists_compact_mem_nhds x with ⟨K, K_compact, K_mem⟩
state_before: α : Type u_1
β : Type ?u.836440
γ : Type ?u.836443
δ : Type ?u.836446
ι : Type ?u.836449
R : Type ?u.836452
R' : Type ?u.836455
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
inst✝² : TopologicalSpace α
inst✝¹ : LocallyCompactSpace α
inst✝ : IsFiniteMeasureOnCompacts μ
x : α
⊢ FiniteAtFilter μ (𝓝 x)

tactic: exact ⟨K, K_mem, K_compact.measure_lt_top⟩
state_before: case intro.intro
α : Type u_1
β : Type ?u.836440
γ : Type ?u.836443
δ : Type ?u.836446
ι : Type ?u.836449
R : Type ?u.836452
R' : Type ?u.836455
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
inst✝² : TopologicalSpace α
inst✝¹ : LocallyCompactSpace α
inst✝ : IsFiniteMeasureOnCompacts μ
x : α
K : Set α
K_compact : IsCompact K
K_mem : K ∈ 𝓝 x
⊢ FiniteAtFilter μ (𝓝 x)
Theorem: Bool.or_true
File: src/lean/Init/SimpLemmas.lean

tactic: cases b <;> rfl
state_before: b : Bool
⊢ (b || true) = true
Theorem: Nat.SOM.Mon.mul_denote
File: src/lean/Init/Data/Nat/SOM.lean

tactic: induction fuel generalizing m₁ m₂ with
| zero => simp! [append_denote]
| succ _ ih =>
  simp!
  split <;> simp!
  next v₁ m₁ v₂ m₂ =>
    by_cases hlt : Nat.blt v₁ v₂ <;> simp! [hlt, Nat.mul_assoc, ih]
    by_cases hgt : Nat.blt v₂ v₁ <;> simp! [hgt, Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, ih]
state_before: ctx : Context
m₁✝ m₂✝ : Mon
fuel : Nat
m₁ m₂ : Mon
⊢ denote ctx (mul.go fuel m₁ m₂) = denote ctx m₁ * denote ctx m₂

tactic: simp! [append_denote]
state_before: case zero
ctx : Context
m₁✝ m₂✝ m₁ m₂ : Mon
⊢ denote ctx (mul.go zero m₁ m₂) = denote ctx m₁ * denote ctx m₂

tactic: simp!
state_before: case succ
ctx : Context
m₁✝ m₂✝ : Mon
n✝ : Nat
ih : ∀ (m₁ m₂ : Mon), denote ctx (mul.go n✝ m₁ m₂) = denote ctx m₁ * denote ctx m₂
m₁ m₂ : Mon
⊢ denote ctx (mul.go (succ n✝) m₁ m₂) = denote ctx m₁ * denote ctx m₂

tactic: split <;> simp!
state_before: case succ
ctx : Context
m₁✝ m₂✝ : Mon
n✝ : Nat
ih : ∀ (m₁ m₂ : Mon), denote ctx (mul.go n✝ m₁ m₂) = denote ctx m₁ * denote ctx m₂
m₁ m₂ : Mon
⊢ denote ctx
      (match m₁, m₂ with
      | m₁, [] => m₁
      | [], m₁ => m₁
      | v₁ :: m₁, v₂ :: m₂ =>
        bif blt v₁ v₂ then v₁ :: mul.go n✝ m₁ (v₂ :: m₂)
        else bif blt v₂ v₁ then v₂ :: mul.go n✝ (v₁ :: m₁) m₂ else v₁ :: v₂ :: mul.go n✝ m₁ m₂) =
    denote ctx m₁ * denote ctx m₂

tactic: next v₁ m₁ v₂ m₂ =>
  by_cases hlt : Nat.blt v₁ v₂ <;> simp! [hlt, Nat.mul_assoc, ih]
  by_cases hgt : Nat.blt v₂ v₁ <;> simp! [hgt, Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, ih]
state_before: case succ.h_3
ctx : Context
m₁ m₂ : Mon
n✝ : Nat
ih : ∀ (m₁ m₂ : Mon), denote ctx (mul.go n✝ m₁ m₂) = denote ctx m₁ * denote ctx m₂
m₁✝¹ m₂✝¹ : Mon
v₁✝ : Var
m₁✝ : List Var
v₂✝ : Var
m₂✝ : List Var
⊢ denote ctx
      (bif blt v₁✝ v₂✝ then v₁✝ :: mul.go n✝ m₁✝ (v₂✝ :: m₂✝)
      else bif blt v₂✝ v₁✝ then v₂✝ :: mul.go n✝ (v₁✝ :: m₁✝) m₂✝ else v₁✝ :: v₂✝ :: mul.go n✝ m₁✝ m₂✝) =
    Var.denote ctx v₁✝ * denote ctx m₁✝ * (Var.denote ctx v₂✝ * denote ctx m₂✝)

tactic: by_cases hlt : Nat.blt v₁ v₂ <;> simp! [hlt, Nat.mul_assoc, ih]
state_before: ctx : Context
m₁✝¹ m₂✝¹ : Mon
n✝ : Nat
ih : ∀ (m₁ m₂ : Mon), denote ctx (mul.go n✝ m₁ m₂) = denote ctx m₁ * denote ctx m₂
m₁✝ m₂✝ : Mon
v₁ : Var
m₁ : List Var
v₂ : Var
m₂ : List Var
⊢ denote ctx
      (bif blt v₁ v₂ then v₁ :: mul.go n✝ m₁ (v₂ :: m₂)
      else bif blt v₂ v₁ then v₂ :: mul.go n✝ (v₁ :: m₁) m₂ else v₁ :: v₂ :: mul.go n✝ m₁ m₂) =
    Var.denote ctx v₁ * denote ctx m₁ * (Var.denote ctx v₂ * denote ctx m₂)

tactic: by_cases hgt : Nat.blt v₂ v₁ <;> simp! [hgt, Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, ih]
state_before: case inr
ctx : Context
m₁✝¹ m₂✝¹ : Mon
n✝ : Nat
ih : ∀ (m₁ m₂ : Mon), denote ctx (mul.go n✝ m₁ m₂) = denote ctx m₁ * denote ctx m₂
m₁✝ m₂✝ : Mon
v₁ : Var
m₁ : List Var
v₂ : Var
m₂ : List Var
hlt : ¬blt v₁ v₂ = true
⊢ denote ctx (bif blt v₂ v₁ then v₂ :: mul.go n✝ (v₁ :: m₁) m₂ else v₁ :: v₂ :: mul.go n✝ m₁ m₂) =
    Var.denote ctx v₁ * (denote ctx m₁ * (Var.denote ctx v₂ * denote ctx m₂))
Theorem: IntermediateField.fG_of_fG_toSubalgebra
File: Mathlib/FieldTheory/Adjoin.lean

tactic: cases' h with t ht
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : IntermediateField F E
h : Subalgebra.FG S.toSubalgebra
⊢ FG S

tactic: exact ⟨t, (eq_adjoin_of_eq_algebra_adjoin _ _ _ ht.symm).symm⟩
state_before: case intro
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : IntermediateField F E
t : Finset E
ht : Algebra.adjoin F ↑t = S.toSubalgebra
⊢ FG S
Theorem: Filter.comap_map
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [preimage_image_eq s h, Subset.rfl]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.260169
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m✝ : α → β
m' : β → γ
s✝ : Set α
t : Set β
f : Filter α
m : α → β
h : Injective m
s : Set α
hs : s ∈ f
⊢ m ⁻¹' (m '' s) ⊆ s
Theorem: Set.InjOn.image_biInter_eq
File: Mathlib/Data/Set/Lattice.lean

tactic: simp only [iInter, iInf_subtype']
state_before: α : Type u_1
β : Type u_3
γ : Type ?u.188767
ι : Sort u_2
ι' : Sort ?u.188773
ι₂ : Sort ?u.188776
κ : ι → Sort ?u.188781
κ₁ : ι → Sort ?u.188786
κ₂ : ι → Sort ?u.188791
κ' : ι' → Sort ?u.188796
p : ι → Prop
s : (i : ι) → p i → Set α
hp : ∃ i, p i
f : α → β
h : InjOn f (⋃ (i : ι) (hi : p i), s i hi)
⊢ (f '' ⋂ (i : ι) (hi : p i), s i hi) = ⋂ (i : ι) (hi : p i), f '' s i hi

tactic: haveI : Nonempty { i // p i } := nonempty_subtype.2 hp
state_before: α : Type u_1
β : Type u_3
γ : Type ?u.188767
ι : Sort u_2
ι' : Sort ?u.188773
ι₂ : Sort ?u.188776
κ : ι → Sort ?u.188781
κ₁ : ι → Sort ?u.188786
κ₂ : ι → Sort ?u.188791
κ' : ι' → Sort ?u.188796
p : ι → Prop
s : (i : ι) → p i → Set α
hp : ∃ i, p i
f : α → β
h : InjOn f (⋃ (i : ι) (hi : p i), s i hi)
⊢ (f '' ⨅ (x : { i // p i }), s ↑x (_ : p ↑x)) = ⨅ (x : { i // p i }), f '' s ↑x (_ : p ↑x)

tactic: apply InjOn.image_iInter_eq
state_before: α : Type u_1
β : Type u_3
γ : Type ?u.188767
ι : Sort u_2
ι' : Sort ?u.188773
ι₂ : Sort ?u.188776
κ : ι → Sort ?u.188781
κ₁ : ι → Sort ?u.188786
κ₂ : ι → Sort ?u.188791
κ' : ι' → Sort ?u.188796
p : ι → Prop
s : (i : ι) → p i → Set α
hp : ∃ i, p i
f : α → β
h : InjOn f (⋃ (i : ι) (hi : p i), s i hi)
this : Nonempty { i // p i }
⊢ (f '' ⨅ (x : { i // p i }), s ↑x (_ : p ↑x)) = ⨅ (x : { i // p i }), f '' s ↑x (_ : p ↑x)

tactic: simpa only [iUnion, iSup_subtype'] using h
state_before: case h
α : Type u_1
β : Type u_3
γ : Type ?u.188767
ι : Sort u_2
ι' : Sort ?u.188773
ι₂ : Sort ?u.188776
κ : ι → Sort ?u.188781
κ₁ : ι → Sort ?u.188786
κ₂ : ι → Sort ?u.188791
κ' : ι' → Sort ?u.188796
p : ι → Prop
s : (i : ι) → p i → Set α
hp : ∃ i, p i
f : α → β
h : InjOn f (⋃ (i : ι) (hi : p i), s i hi)
this : Nonempty { i // p i }
⊢ InjOn f (⋃ (i : { i // p i }), s ↑i (_ : p ↑i))
Theorem: Filter.coprodᵢ_eq_bot_iff
File: Mathlib/Order/Filter/Pi.lean

tactic: simpa [funext_iff] using coprodᵢ_neBot_iff.not
state_before: ι : Type u_2
α : ι → Type u_1
f f₁ f₂ : (i : ι) → Filter (α i)
s : (i : ι) → Set (α i)
inst✝ : ∀ (i : ι), Nonempty (α i)
⊢ Filter.coprodᵢ f = ⊥ ↔ f = ⊥
Theorem: CategoryTheory.Abelian.Pseudoelement.eq_zero_iff
File: Mathlib/CategoryTheory/Abelian/Pseudoelements.lean

tactic: simp [h]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : Abelian C
P Q : C
f : P ⟶ Q
h : f = 0
a : Pseudoelement P
⊢ pseudoApply f a = 0
Theorem: List.intercalate_eq_intercalateTR
File: Std/Data/List/Basic.lean

tactic: funext α sep l
state_before: ⊢ @intercalate = @intercalateTR

tactic: simp [intercalate, intercalateTR]
state_before: case h.h.h
α : Type u_1
sep : List α
l : List (List α)
⊢ intercalate sep l = intercalateTR sep l

tactic: match l with
| [] => rfl
| [_] => simp
| x::y::xs =>
  let rec go {acc x} : ∀ xs,
    intercalateTR.go sep.toArray x xs acc = acc.data ++ join (intersperse sep (x::xs))
  | [] => by simp [intercalateTR.go]
  | _::_ => by simp [intercalateTR.go, go]
  simp [intersperse, go]
state_before: case h.h.h
α : Type u_1
sep : List α
l : List (List α)
⊢ join (intersperse sep l) =
    match l with
    | [] => []
    | [x] => x
    | x :: xs => intercalateTR.go (toArray sep) x xs #[]

tactic: rfl
state_before: α : Type u_1
sep : List α
l : List (List α)
⊢ join (intersperse sep []) =
    match [] with
    | [] => []
    | [x] => x
    | x :: xs => intercalateTR.go (toArray sep) x xs #[]

tactic: simp
state_before: α : Type u_1
sep : List α
l : List (List α)
head✝ : List α
⊢ join (intersperse sep [head✝]) =
    match [head✝] with
    | [] => []
    | [x] => x
    | x :: xs => intercalateTR.go (toArray sep) x xs #[]

tactic: let rec go {acc x} : ∀ xs,
  intercalateTR.go sep.toArray x xs acc = acc.data ++ join (intersperse sep (x::xs))
| [] => by simp [intercalateTR.go]
| _::_ => by simp [intercalateTR.go, go]
state_before: α : Type u_1
sep : List α
l : List (List α)
x y : List α
xs : List (List α)
⊢ join (intersperse sep (x :: y :: xs)) =
    match x :: y :: xs with
    | [] => []
    | [x] => x
    | x :: xs => intercalateTR.go (toArray sep) x xs #[]

tactic: simp [intersperse, go]
state_before: α : Type u_1
sep : List α
l : List (List α)
x y : List α
xs : List (List α)
⊢ join (intersperse sep (x :: y :: xs)) =
    match x :: y :: xs with
    | [] => []
    | [x] => x
    | x :: xs => intercalateTR.go (toArray sep) x xs #[]

tactic: simp [intercalateTR.go]
state_before: α : Type u_1
sep : List α
l : List (List α)
x✝ y : List α
xs : List (List α)
acc : Array α
x : List α
⊢ intercalateTR.go (toArray sep) x [] acc = acc.data ++ join (intersperse sep [x])

tactic: simp [intercalateTR.go, go]
state_before: α : Type u_1
sep : List α
l : List (List α)
x✝ y : List α
xs : List (List α)
acc : Array α
x head✝ : List α
tail✝ : List (List α)
⊢ intercalateTR.go (toArray sep) x (head✝ :: tail✝) acc = acc.data ++ join (intersperse sep (x :: head✝ :: tail✝))
Theorem: Codisjoint.bihimp_eq_inf
File: Mathlib/Order/SymmDiff.lean

tactic: rw [bihimp, h.himp_eq_left, h.himp_eq_right]
state_before: ι : Type ?u.44592
α : Type u_1
β : Type ?u.44598
π : ι → Type ?u.44603
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c d a b : α
h : Codisjoint a b
⊢ a ⇔ b = a ⊓ b
Theorem: MonoidHomClass.isometry_iff_norm
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: simp only [isometry_iff_dist_eq, dist_eq_norm_div, ← map_div]
state_before: 𝓕 : Type u_1
𝕜 : Type ?u.280047
α : Type ?u.280050
ι : Type ?u.280053
κ : Type ?u.280056
E : Type u_2
F : Type u_3
G : Type ?u.280065
inst✝³ : SeminormedGroup E
inst✝² : SeminormedGroup F
inst✝¹ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
inst✝ : MonoidHomClass 𝓕 E F
f : 𝓕
⊢ Isometry ↑f ↔ ∀ (x : E), ‖↑f x‖ = ‖x‖

tactic: refine' ⟨fun h x => _, fun h x y => h _⟩
state_before: 𝓕 : Type u_1
𝕜 : Type ?u.280047
α : Type ?u.280050
ι : Type ?u.280053
κ : Type ?u.280056
E : Type u_2
F : Type u_3
G : Type ?u.280065
inst✝³ : SeminormedGroup E
inst✝² : SeminormedGroup F
inst✝¹ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
inst✝ : MonoidHomClass 𝓕 E F
f : 𝓕
⊢ (∀ (x y : E), ‖↑f (x / y)‖ = ‖x / y‖) ↔ ∀ (x : E), ‖↑f x‖ = ‖x‖

tactic: simpa using h x 1
state_before: 𝓕 : Type u_1
𝕜 : Type ?u.280047
α : Type ?u.280050
ι : Type ?u.280053
κ : Type ?u.280056
E : Type u_2
F : Type u_3
G : Type ?u.280065
inst✝³ : SeminormedGroup E
inst✝² : SeminormedGroup F
inst✝¹ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
inst✝ : MonoidHomClass 𝓕 E F
f : 𝓕
h : ∀ (x y : E), ‖↑f (x / y)‖ = ‖x / y‖
x : E
⊢ ‖↑f x‖ = ‖x‖
Theorem: Ordinal.nfpFamily_eq_self
File: Mathlib/SetTheory/Ordinal/FixedPoint.lean

tactic: rw [List.foldr_fixed' h l]
state_before: ι : Type u
f✝ : ι → Ordinal → Ordinal
f : ι → Ordinal → Ordinal
a : Ordinal
h : ∀ (i : ι), f i a = a
l : List ι
⊢ List.foldr f a l ≤ a
Theorem: Units.add_divp
File: Mathlib/Algebra/Ring/Units.lean

tactic: simp only [divp, add_mul, Units.mul_inv_cancel_right]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : Ring α
a✝ b✝ a b : α
u : αˣ
⊢ a + b /ₚ u = (a * ↑u + b) /ₚ u
Theorem: Ideal.mem_span_singleton_sup
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: rw [Submodule.mem_sup]
state_before: α : Type u
β : Type v
inst✝¹ : Semiring α
I✝ : Ideal α
a b : α
S : Type u_1
inst✝ : CommSemiring S
x y : S
I : Ideal S
⊢ x ∈ span {y} ⊔ I ↔ ∃ a b, b ∈ I ∧ a * y + b = x

tactic: constructor
state_before: α : Type u
β : Type v
inst✝¹ : Semiring α
I✝ : Ideal α
a b : α
S : Type u_1
inst✝ : CommSemiring S
x y : S
I : Ideal S
⊢ (∃ y_1, y_1 ∈ span {y} ∧ ∃ z, z ∈ I ∧ y_1 + z = x) ↔ ∃ a b, b ∈ I ∧ a * y + b = x

tactic: rintro ⟨ya, hya, b, hb, rfl⟩
state_before: case mp
α : Type u
β : Type v
inst✝¹ : Semiring α
I✝ : Ideal α
a b : α
S : Type u_1
inst✝ : CommSemiring S
x y : S
I : Ideal S
⊢ (∃ y_1, y_1 ∈ span {y} ∧ ∃ z, z ∈ I ∧ y_1 + z = x) → ∃ a b, b ∈ I ∧ a * y + b = x

tactic: obtain ⟨a, rfl⟩ := mem_span_singleton'.mp hya
state_before: case mp.intro.intro.intro.intro
α : Type u
β : Type v
inst✝¹ : Semiring α
I✝ : Ideal α
a b✝ : α
S : Type u_1
inst✝ : CommSemiring S
y : S
I : Ideal S
ya : S
hya : ya ∈ span {y}
b : S
hb : b ∈ I
⊢ ∃ a b_1, b_1 ∈ I ∧ a * y + b_1 = ya + b

tactic: exact ⟨a, b, hb, rfl⟩
state_before: case mp.intro.intro.intro.intro.intro
α : Type u
β : Type v
inst✝¹ : Semiring α
I✝ : Ideal α
a✝ b✝ : α
S : Type u_1
inst✝ : CommSemiring S
y : S
I : Ideal S
b : S
hb : b ∈ I
a : S
hya : a * y ∈ span {y}
⊢ ∃ a_1 b_1, b_1 ∈ I ∧ a_1 * y + b_1 = a * y + b

tactic: rintro ⟨a, b, hb, rfl⟩
state_before: case mpr
α : Type u
β : Type v
inst✝¹ : Semiring α
I✝ : Ideal α
a b : α
S : Type u_1
inst✝ : CommSemiring S
x y : S
I : Ideal S
⊢ (∃ a b, b ∈ I ∧ a * y + b = x) → ∃ y_1, y_1 ∈ span {y} ∧ ∃ z, z ∈ I ∧ y_1 + z = x

tactic: exact ⟨a * y, Ideal.mem_span_singleton'.mpr ⟨a, rfl⟩, b, hb, rfl⟩
state_before: case mpr.intro.intro.intro
α : Type u
β : Type v
inst✝¹ : Semiring α
I✝ : Ideal α
a✝ b✝ : α
S : Type u_1
inst✝ : CommSemiring S
y : S
I : Ideal S
a b : S
hb : b ∈ I
⊢ ∃ y_1, y_1 ∈ span {y} ∧ ∃ z, z ∈ I ∧ y_1 + z = a * y + b
Theorem: EReal.mul_comm
File: Mathlib/Data/Real/EReal.lean

tactic: induction' x using EReal.rec with x <;> induction' y using EReal.rec with y <;>
  try { rfl }
state_before: x y : EReal
⊢ x * y = y * x

tactic: rw [← coe_mul, ← coe_mul, mul_comm]
state_before: case h_real.h_real
x y : ℝ
⊢ ↑x * ↑y = ↑y * ↑x
Theorem: Matrix.Pivot.listTransvecCol_mul_mul_listTransvecRow_last_col
File: Mathlib/LinearAlgebra/Matrix/Transvection.lean

tactic: have : listTransvecRow M = listTransvecRow ((listTransvecCol M).prod ⬝ M) := by
  simp [listTransvecRow, listTransvecCol_mul_last_row]
state_before: n : Type ?u.204767
p : Type ?u.204770
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
hM : M (inr ()) (inr ()) ≠ 0
i : Fin r
⊢ (List.prod (listTransvecCol M) ⬝ M ⬝ List.prod (listTransvecRow M)) (inr ()) (inl i) = 0

tactic: rw [this]
state_before: n : Type ?u.204767
p : Type ?u.204770
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
hM : M (inr ()) (inr ()) ≠ 0
i : Fin r
this : listTransvecRow M = listTransvecRow (List.prod (listTransvecCol M) ⬝ M)
⊢ (List.prod (listTransvecCol M) ⬝ M ⬝ List.prod (listTransvecRow M)) (inr ()) (inl i) = 0

tactic: apply mul_listTransvecRow_last_row
state_before: n : Type ?u.204767
p : Type ?u.204770
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
hM : M (inr ()) (inr ()) ≠ 0
i : Fin r
this : listTransvecRow M = listTransvecRow (List.prod (listTransvecCol M) ⬝ M)
⊢ (List.prod (listTransvecCol M) ⬝ M ⬝ List.prod (listTransvecRow (List.prod (listTransvecCol M) ⬝ M))) (inr ())
      (inl i) =
    0

tactic: simpa [listTransvecCol_mul_last_row] using hM
state_before: case hM
n : Type ?u.204767
p : Type ?u.204770
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
hM : M (inr ()) (inr ()) ≠ 0
i : Fin r
this : listTransvecRow M = listTransvecRow (List.prod (listTransvecCol M) ⬝ M)
⊢ (List.prod (listTransvecCol M) ⬝ M) (inr ()) (inr ()) ≠ 0

tactic: simp [listTransvecRow, listTransvecCol_mul_last_row]
state_before: n : Type ?u.204767
p : Type ?u.204770
R : Type u₂
𝕜 : Type u_1
inst✝³ : Field 𝕜
inst✝² : DecidableEq n
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
hM : M (inr ()) (inr ()) ≠ 0
i : Fin r
⊢ listTransvecRow M = listTransvecRow (List.prod (listTransvecCol M) ⬝ M)
Theorem: Submodule.IsPrincipal.mem_iff_eq_smul_generator
File: Mathlib/RingTheory/PrincipalIdealDomain.lean

tactic: simp_rw [@eq_comm _ x, ← mem_span_singleton, span_singleton_generator]
state_before: R : Type u
M : Type v
inst✝³ : AddCommGroup M
inst✝² : Ring R
inst✝¹ : Module R M
S : Submodule R M
inst✝ : IsPrincipal S
x : M
⊢ x ∈ S ↔ ∃ s, x = s • generator S
Theorem: Subtype.eta
File: src/lean/Init/Core.lean

tactic: cases a
state_before: a✝ b c d : Prop
α : Type u
p : α → Prop
a : Subtype fun x => p x
h : p a.val
⊢ { val := a.val, property := h } = a

tactic: exact rfl
state_before: case mk
a b c d : Prop
α : Type u
p : α → Prop
val✝ : α
property✝ : p val✝
h : p { val := val✝, property := property✝ }.val
⊢ { val := { val := val✝, property := property✝ }.val, property := h } = { val := val✝, property := property✝ }
Theorem: Part.le_total_of_le_of_le
File: Mathlib/Data/Part.lean

tactic: rcases Part.eq_none_or_eq_some x with (h | ⟨b, h₀⟩)
state_before: α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx : x ≤ z
hy : y ≤ z
⊢ x ≤ y ∨ y ≤ x

tactic: right
state_before: case inr.intro
α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx : x ≤ z
hy : y ≤ z
b : α
h₀ : x = some b
⊢ x ≤ y ∨ y ≤ x

tactic: intro b' h₁
state_before: case inr.intro.h
α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx : x ≤ z
hy : y ≤ z
b : α
h₀ : x = some b
⊢ y ≤ x

tactic: rw [Part.eq_some_iff] at h₀
state_before: case inr.intro.h
α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx : x ≤ z
hy : y ≤ z
b : α
h₀ : x = some b
b' : α
h₁ : b' ∈ y
⊢ b' ∈ x

tactic: have hx := hx _ h₀
state_before: case inr.intro.h
α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx : x ≤ z
hy : y ≤ z
b : α
h₀ : b ∈ x
b' : α
h₁ : b' ∈ y
⊢ b' ∈ x

tactic: have hy := hy _ h₁
state_before: case inr.intro.h
α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx✝ : x ≤ z
hy : y ≤ z
b : α
h₀ : b ∈ x
b' : α
h₁ : b' ∈ y
hx : b ∈ z
⊢ b' ∈ x

tactic: have hx := Part.mem_unique hx hy
state_before: case inr.intro.h
α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx✝ : x ≤ z
hy✝ : y ≤ z
b : α
h₀ : b ∈ x
b' : α
h₁ : b' ∈ y
hx : b ∈ z
hy : b' ∈ z
⊢ b' ∈ x

tactic: subst hx
state_before: case inr.intro.h
α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx✝¹ : x ≤ z
hy✝ : y ≤ z
b : α
h₀ : b ∈ x
b' : α
h₁ : b' ∈ y
hx✝ : b ∈ z
hy : b' ∈ z
hx : b = b'
⊢ b' ∈ x

tactic: exact h₀
state_before: case inr.intro.h
α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx✝ : x ≤ z
hy✝ : y ≤ z
b : α
h₀ : b ∈ x
hx : b ∈ z
h₁ : b ∈ y
hy : b ∈ z
⊢ b ∈ x

tactic: rw [h]
state_before: case inl
α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx : x ≤ z
hy : y ≤ z
h : x = none
⊢ x ≤ y ∨ y ≤ x

tactic: left
state_before: case inl
α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx : x ≤ z
hy : y ≤ z
h : x = none
⊢ none ≤ y ∨ y ≤ none

tactic: apply OrderBot.bot_le _
state_before: case inl.h
α : Type u_1
β : Type ?u.12580
γ : Type ?u.12583
x y z : Part α
hx : x ≤ z
hy : y ≤ z
h : x = none
⊢ none ≤ y
Theorem: AffineSubspace.affineSpan_eq_top_iff_vectorSpan_eq_top_of_nonempty
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: refine' ⟨vectorSpan_eq_top_of_affineSpan_eq_top k V P, _⟩
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
hs : Set.Nonempty s
⊢ affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤

tactic: intro h
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
hs : Set.Nonempty s
⊢ vectorSpan k s = ⊤ → affineSpan k s = ⊤

tactic: suffices Nonempty (affineSpan k s) by
  obtain ⟨p, hp : p ∈ affineSpan k s⟩ := this
  rw [eq_iff_direction_eq_of_mem hp (mem_top k V p), direction_affineSpan, h, direction_top]
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
hs : Set.Nonempty s
h : vectorSpan k s = ⊤
⊢ affineSpan k s = ⊤

tactic: obtain ⟨x, hx⟩ := hs
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
hs : Set.Nonempty s
h : vectorSpan k s = ⊤
⊢ Nonempty { x // x ∈ affineSpan k s }

tactic: exact ⟨⟨x, mem_affineSpan k hx⟩⟩
state_before: case intro
k : Type u_2
V : Type u_3
P : Type u_1
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
h : vectorSpan k s = ⊤
x : P
hx : x ∈ s
⊢ Nonempty { x // x ∈ affineSpan k s }

tactic: obtain ⟨p, hp : p ∈ affineSpan k s⟩ := this
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
hs : Set.Nonempty s
h : vectorSpan k s = ⊤
this : Nonempty { x // x ∈ affineSpan k s }
⊢ affineSpan k s = ⊤

tactic: rw [eq_iff_direction_eq_of_mem hp (mem_top k V p), direction_affineSpan, h, direction_top]
state_before: case intro.mk
k : Type u_2
V : Type u_3
P : Type u_1
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
s : Set P
hs : Set.Nonempty s
h : vectorSpan k s = ⊤
p : P
hp : p ∈ affineSpan k s
⊢ affineSpan k s = ⊤