1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: LinearPMap.mem_domain_of_mem_graph
File: Mathlib/LinearAlgebra/LinearPMap.lean

tactic: rw [mem_domain_iff]
state_before: R : Type u_1
inst✝⁹ : Ring R
E : Type u_2
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module R E
F : Type u_3
inst✝⁶ : AddCommGroup F
inst✝⁵ : Module R F
G : Type u_4
inst✝⁴ : AddCommGroup G
inst✝³ : Module R G
M : Type u_5
inst✝² : Monoid M
inst✝¹ : DistribMulAction M F
inst✝ : SMulCommClass R M F
y✝ : M
f : E →ₗ.[R] F
x : E
y : F
h : (x, y) ∈ f.graph
⊢ x ∈ f.domain
state_after: R : Type u_1
inst✝⁹ : Ring R
E : Type u_2
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module R E
F : Type u_3
inst✝⁶ : AddCommGroup F
inst✝⁵ : Module R F
G : Type u_4
inst✝⁴ : AddCommGroup G
inst✝³ : Module R G
M : Type u_5
inst✝² : Monoid M
inst✝¹ : DistribMulAction M F
inst✝ : SMulCommClass R M F
y✝ : M
f : E →ₗ.[R] F
x : E
y : F
h : (x, y) ∈ f.graph
⊢ ∃ y, (x, y) ∈ f.graph

tactic: exact ⟨y, h⟩
state_before: R : Type u_1
inst✝⁹ : Ring R
E : Type u_2
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module R E
F : Type u_3
inst✝⁶ : AddCommGroup F
inst✝⁵ : Module R F
G : Type u_4
inst✝⁴ : AddCommGroup G
inst✝³ : Module R G
M : Type u_5
inst✝² : Monoid M
inst✝¹ : DistribMulAction M F
inst✝ : SMulCommClass R M F
y✝ : M
f : E →ₗ.[R] F
x : E
y : F
h : (x, y) ∈ f.graph
⊢ ∃ y, (x, y) ∈ f.graph
state_after: no goals
Theorem: CategoryTheory.Functor.preservesZeroMorphisms_of_map_zero_object
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Zero.lean

tactic: rw [← Functor.map_comp, comp_zero]
state_before: C : Type u₁
inst✝⁶ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁵ : Category.{v₂, u₂} D
E : Type u₃
inst✝⁴ : Category.{v₃, u₃} E
inst✝³ : HasZeroObject C
inst✝² : HasZeroObject D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
F : C ⥤ D
i : F.obj 0 ≅ 0
X Y : C
⊢ F.map 0 = F.map 0 ≫ F.map 0
state_after: no goals

tactic: rw [Iso.hom_inv_id, Category.id_comp]
state_before: C : Type u₁
inst✝⁶ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁵ : Category.{v₂, u₂} D
E : Type u₃
inst✝⁴ : Category.{v₃, u₃} E
inst✝³ : HasZeroObject C
inst✝² : HasZeroObject D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
F : C ⥤ D
i : F.obj 0 ≅ 0
X Y : C
⊢ F.map 0 ≫ F.map 0 = F.map 0 ≫ (i.hom ≫ i.inv) ≫ F.map 0
state_after: no goals

tactic: simp only [zero_of_to_zero i.hom, zero_comp, comp_zero]
state_before: C : Type u₁
inst✝⁶ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁵ : Category.{v₂, u₂} D
E : Type u₃
inst✝⁴ : Category.{v₃, u₃} E
inst✝³ : HasZeroObject C
inst✝² : HasZeroObject D
inst✝¹ : HasZeroMorphisms C
inst✝ : HasZeroMorphisms D
F : C ⥤ D
i : F.obj 0 ≅ 0
X Y : C
⊢ F.map 0 ≫ (i.hom ≫ i.inv) ≫ F.map 0 = 0
state_after: no goals
Theorem: finSuccEquiv'_at
File: Mathlib/Logic/Equiv/Fin.lean

tactic: simp [finSuccEquiv']
state_before: m n : ℕ
i : Fin (n + 1)
⊢ (finSuccEquiv' i) i = none
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.X_eq_of_equiv
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: rcases h with ⟨u, rfl⟩
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P Q : Fin 3 → R
h : P ≈ Q
⊢ P x * Q z ^ 2 = Q x * P z ^ 2
state_after: case intro
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
Q : Fin 3 → R
u : Rˣ
⊢ (fun m => m • Q) u x * Q z ^ 2 = Q x * (fun m => m • Q) u z ^ 2

tactic: simp only [Units.smul_def, smul_fin3_ext]
state_before: case intro
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
Q : Fin 3 → R
u : Rˣ
⊢ (fun m => m • Q) u x * Q z ^ 2 = Q x * (fun m => m • Q) u z ^ 2
state_after: case intro
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
Q : Fin 3 → R
u : Rˣ
⊢ ↑u ^ 2 * Q x * Q z ^ 2 = Q x * (↑u * Q z) ^ 2

tactic: ring1
state_before: case intro
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
Q : Fin 3 → R
u : Rˣ
⊢ ↑u ^ 2 * Q x * Q z ^ 2 = Q x * (↑u * Q z) ^ 2
state_after: no goals
Theorem: DirectSum.coe_of_mul_apply
File: Mathlib/Algebra/DirectSum/Internal.lean

tactic: split_ifs with h
state_before: ι : Type u_1
σ : Type u_2
S : Type u_3
R : Type u_4
inst✝⁹ : DecidableEq ι
inst✝⁸ : Semiring R
inst✝⁷ : SetLike σ R
inst✝⁶ : AddSubmonoidClass σ R
A : ι → σ
inst✝⁵ : CanonicallyOrderedAddCommMonoid ι
inst✝⁴ : SetLike.GradedMonoid A
inst✝³ : Sub ι
inst✝² : OrderedSub ι
inst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
i : ι
r : ↥(A i)
r' : ⨁ (i : ι), ↥(A i)
n : ι
inst✝ : Decidable (i ≤ n)
⊢ ↑(((of (fun i => ↥(A i)) i) r * r') n) = if i ≤ n then ↑r * ↑(r' (n - i)) else 0
state_after: case pos
ι : Type u_1
σ : Type u_2
S : Type u_3
R : Type u_4
inst✝⁹ : DecidableEq ι
inst✝⁸ : Semiring R
inst✝⁷ : SetLike σ R
inst✝⁶ : AddSubmonoidClass σ R
A : ι → σ
inst✝⁵ : CanonicallyOrderedAddCommMonoid ι
inst✝⁴ : SetLike.GradedMonoid A
inst✝³ : Sub ι
inst✝² : OrderedSub ι
inst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
i : ι
r : ↥(A i)
r' : ⨁ (i : ι), ↥(A i)
n : ι
inst✝ : Decidable (i ≤ n)
h : i ≤ n
⊢ ↑(((of (fun i => ↥(A i)) i) r * r') n) = ↑r * ↑(r' (n - i))

case neg
ι : Type u_1
σ : Type u_2
S : Type u_3
R : Type u_4
inst✝⁹ : DecidableEq ι
inst✝⁸ : Semiring R
inst✝⁷ : SetLike σ R
inst✝⁶ : AddSubmonoidClass σ R
A : ι → σ
inst✝⁵ : CanonicallyOrderedAddCommMonoid ι
inst✝⁴ : SetLike.GradedMonoid A
inst✝³ : Sub ι
inst✝² : OrderedSub ι
inst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
i : ι
r : ↥(A i)
r' : ⨁ (i : ι), ↥(A i)
n : ι
inst✝ : Decidable (i ≤ n)
h : ¬i ≤ n
⊢ ↑(((of (fun i => ↥(A i)) i) r * r') n) = 0

tactic: exacts [coe_of_mul_apply_of_le _ _ _ n h, coe_of_mul_apply_of_not_le _ _ _ n h]
state_before: case pos
ι : Type u_1
σ : Type u_2
S : Type u_3
R : Type u_4
inst✝⁹ : DecidableEq ι
inst✝⁸ : Semiring R
inst✝⁷ : SetLike σ R
inst✝⁶ : AddSubmonoidClass σ R
A : ι → σ
inst✝⁵ : CanonicallyOrderedAddCommMonoid ι
inst✝⁴ : SetLike.GradedMonoid A
inst✝³ : Sub ι
inst✝² : OrderedSub ι
inst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
i : ι
r : ↥(A i)
r' : ⨁ (i : ι), ↥(A i)
n : ι
inst✝ : Decidable (i ≤ n)
h : i ≤ n
⊢ ↑(((of (fun i => ↥(A i)) i) r * r') n) = ↑r * ↑(r' (n - i))

case neg
ι : Type u_1
σ : Type u_2
S : Type u_3
R : Type u_4
inst✝⁹ : DecidableEq ι
inst✝⁸ : Semiring R
inst✝⁷ : SetLike σ R
inst✝⁶ : AddSubmonoidClass σ R
A : ι → σ
inst✝⁵ : CanonicallyOrderedAddCommMonoid ι
inst✝⁴ : SetLike.GradedMonoid A
inst✝³ : Sub ι
inst✝² : OrderedSub ι
inst✝¹ : ContravariantClass ι ι (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
i : ι
r : ↥(A i)
r' : ⨁ (i : ι), ↥(A i)
n : ι
inst✝ : Decidable (i ≤ n)
h : ¬i ≤ n
⊢ ↑(((of (fun i => ↥(A i)) i) r * r') n) = 0
state_after: no goals
Theorem: closure_eq_uniformity
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: ext ⟨x, y⟩
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
s : Set (α × α)
⊢ closure s = ⋂ V ∈ {V | V ∈ 𝓤 α ∧ SymmetricRel V}, V ○ s ○ V
state_after: case h.mk
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
s : Set (α × α)
x y : α
⊢ (x, y) ∈ closure s ↔ (x, y) ∈ ⋂ V ∈ {V | V ∈ 𝓤 α ∧ SymmetricRel V}, V ○ s ○ V

tactic: simp (config := { contextual := true }) only
  [mem_closure_iff_nhds_basis (UniformSpace.hasBasis_nhds_prod x y), mem_iInter, mem_setOf_eq,
    and_imp, mem_comp_comp, exists_prop, ← mem_inter_iff, inter_comm, Set.Nonempty]
state_before: case h.mk
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
s : Set (α × α)
x y : α
⊢ (x, y) ∈ closure s ↔ (x, y) ∈ ⋂ V ∈ {V | V ∈ 𝓤 α ∧ SymmetricRel V}, V ○ s ○ V
state_after: no goals
Theorem: Set.seq_def
File: Mathlib/Data/Set/Lattice.lean

tactic: rw [seq_eq_image2, iUnion_image_left]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : Set (α → β)
t : Set α
⊢ s.seq t = ⋃ f ∈ s, f '' t
state_after: no goals
Theorem: IsCoercive.ker_eq_bot
File: Mathlib/Analysis/InnerProductSpace/LaxMilgram.lean

tactic: rw [LinearMapClass.ker_eq_bot]
state_before: V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
⊢ ker (continuousLinearMapOfBilin B) = ⊥
state_after: V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
⊢ Function.Injective ⇑(continuousLinearMapOfBilin B)

tactic: rcases coercive.antilipschitz with ⟨_, _, antilipschitz⟩
state_before: V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
⊢ Function.Injective ⇑(continuousLinearMapOfBilin B)
state_after: case intro.intro
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
w✝ : ℝ≥0
left✝ : 0 < w✝
antilipschitz : AntilipschitzWith w✝ ⇑(continuousLinearMapOfBilin B)
⊢ Function.Injective ⇑(continuousLinearMapOfBilin B)

tactic: exact antilipschitz.injective
state_before: case intro.intro
V : Type u
inst✝² : NormedAddCommGroup V
inst✝¹ : InnerProductSpace ℝ V
inst✝ : CompleteSpace V
B : V →L[ℝ] V →L[ℝ] ℝ
coercive : IsCoercive B
w✝ : ℝ≥0
left✝ : 0 < w✝
antilipschitz : AntilipschitzWith w✝ ⇑(continuousLinearMapOfBilin B)
⊢ Function.Injective ⇑(continuousLinearMapOfBilin B)
state_after: no goals
Theorem: Function.Involutive.iterate_bit0
File: Mathlib/Algebra/Ring/Parity.lean

tactic: rw [bit0, ← two_mul, iterate_mul, involutive_iff_iter_2_eq_id.1 hf, iterate_id]
state_before: F : Type u_1
α✝ : Type u_2
β : Type u_3
R : Type u_4
α : Type u_5
f : α → α
n✝ : ℕ
hf : Involutive f
n : ℕ
⊢ f^[bit0 n] = id
state_after: no goals
Theorem: List.dvd_sum
File: Mathlib/Algebra/BigOperators/Ring/List.lean

tactic: induction' l with x l ih
state_before: ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝ : NonUnitalSemiring R
a : R
l : List R
h : ∀ x ∈ l, a ∣ x
⊢ a ∣ l.sum
state_after: case nil
ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝ : NonUnitalSemiring R
a : R
h : ∀ x ∈ [], a ∣ x
⊢ a ∣ [].sum

case cons
ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝ : NonUnitalSemiring R
a x : R
l : List R
ih : (∀ x ∈ l, a ∣ x) → a ∣ l.sum
h : ∀ x_1 ∈ x :: l, a ∣ x_1
⊢ a ∣ (x :: l).sum

tactic: exact dvd_zero _
state_before: case nil
ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝ : NonUnitalSemiring R
a : R
h : ∀ x ∈ [], a ∣ x
⊢ a ∣ [].sum
state_after: no goals

tactic: rw [List.sum_cons]
state_before: case cons
ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝ : NonUnitalSemiring R
a x : R
l : List R
ih : (∀ x ∈ l, a ∣ x) → a ∣ l.sum
h : ∀ x_1 ∈ x :: l, a ∣ x_1
⊢ a ∣ (x :: l).sum
state_after: case cons
ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝ : NonUnitalSemiring R
a x : R
l : List R
ih : (∀ x ∈ l, a ∣ x) → a ∣ l.sum
h : ∀ x_1 ∈ x :: l, a ∣ x_1
⊢ a ∣ x + l.sum

tactic: exact dvd_add (h _ (mem_cons_self _ _)) (ih fun x hx ↦ h x (mem_cons_of_mem _ hx))
state_before: case cons
ι : Type u_1
κ : Type u_2
M : Type u_3
M₀ : Type u_4
R : Type u_5
inst✝ : NonUnitalSemiring R
a x : R
l : List R
ih : (∀ x ∈ l, a ∣ x) → a ∣ l.sum
h : ∀ x_1 ∈ x :: l, a ∣ x_1
⊢ a ∣ x + l.sum
state_after: no goals
Theorem: List.enum_map_fst
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: simp only [enum, enumFrom_map_fst, range_eq_range']
state_before: α : Type u_1
l : List α
⊢ map Prod.fst l.enum = range l.length
state_after: no goals
Theorem: CategoryTheory.Triangulated.Subcategory.W_iff
File: Mathlib/CategoryTheory/Triangulated/Subcategory.lean

tactic: rfl
state_before: C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasZeroObject C
inst✝³ : HasShift C ℤ
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), (shiftFunctor C n).Additive
inst✝ : Pretriangulated C
S : Subcategory C
X Y : C
f : X ⟶ Y
⊢ S.W f ↔ ∃ Z g h, ∃ (_ : Triangle.mk f g h ∈ distinguishedTriangles), S.P Z
state_after: no goals
Theorem: isTorsionFree_iff_noZeroSMulDivisors_int
File: Mathlib/GroupTheory/Torsion.lean

tactic: simp_rw [AddMonoid.IsTorsionFree, isOfFinAddOrder_iff_zsmul_eq_zero, not_exists, not_and,
  noZeroSMulDivisors_iff, forall_swap (β := ℤ)]
state_before: G : Type u_1
H : Type u_2
inst✝ : AddGroup G
⊢ AddMonoid.IsTorsionFree G ↔ NoZeroSMulDivisors ℤ G
state_after: G : Type u_1
H : Type u_2
inst✝ : AddGroup G
⊢ (∀ (y : ℤ) (x : G), x ≠ 0 → y ≠ 0 → ¬y • x = 0) ↔ ∀ {c : ℤ} {x : G}, c • x = 0 → c = 0 ∨ x = 0

tactic: exact forall₂_congr fun _ _ ↦ by tauto
state_before: G : Type u_1
H : Type u_2
inst✝ : AddGroup G
⊢ (∀ (y : ℤ) (x : G), x ≠ 0 → y ≠ 0 → ¬y • x = 0) ↔ ∀ {c : ℤ} {x : G}, c • x = 0 → c = 0 ∨ x = 0
state_after: no goals

tactic: tauto
state_before: G : Type u_1
H : Type u_2
inst✝ : AddGroup G
x✝¹ : ℤ
x✝ : G
⊢ x✝ ≠ 0 → x✝¹ ≠ 0 → ¬x✝¹ • x✝ = 0 ↔ x✝¹ • x✝ = 0 → x✝¹ = 0 ∨ x✝ = 0
state_after: no goals
Theorem: CategoryTheory.Pretriangulated.Opposite.contractible_distinguished
File: Mathlib/CategoryTheory/Triangulated/Opposite.lean

tactic: rw [mem_distinguishedTriangles_iff']
state_before: C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), (shiftFunctor C n).Additive
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ contractibleTriangle X ∈ distinguishedTriangles C
state_after: C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), (shiftFunctor C n).Additive
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ ∃ T',
    ∃ (_ : T' ∈ Pretriangulated.distinguishedTriangles),
      Nonempty (contractibleTriangle X ≅ (triangleOpEquivalence C).functor.obj { unop := T' })

tactic: exact ⟨_, inv_rot_of_distTriang _ (Pretriangulated.contractible_distinguished X.unop),
  ⟨contractibleTriangleIso X⟩⟩
state_before: C : Type u_1
inst✝⁵ : Category.{u_2, u_1} C
inst✝⁴ : HasShift C ℤ
inst✝³ : HasZeroObject C
inst✝² : Preadditive C
inst✝¹ : ∀ (n : ℤ), (shiftFunctor C n).Additive
inst✝ : Pretriangulated C
X : Cᵒᵖ
⊢ ∃ T',
    ∃ (_ : T' ∈ Pretriangulated.distinguishedTriangles),
      Nonempty (contractibleTriangle X ≅ (triangleOpEquivalence C).functor.obj { unop := T' })
state_after: no goals
Theorem: intervalIntegral.norm_integral_le_of_norm_le
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: simp_rw [norm_intervalIntegral_eq, abs_intervalIntegral_eq,
  abs_eq_self.mpr (integral_nonneg_of_ae <| h.mono fun _t ht => (norm_nonneg _).trans ht),
  norm_integral_le_of_norm_le hbound.def' h]
state_before: ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a b : ℝ
f g✝ : ℝ → E
μ : Measure ℝ
g : ℝ → ℝ
h : ∀ᵐ (t : ℝ) ∂μ.restrict (Ι a b), ‖f t‖ ≤ g t
hbound : IntervalIntegrable g μ a b
⊢ ‖∫ (t : ℝ) in a..b, f t ∂μ‖ ≤ |∫ (t : ℝ) in a..b, g t ∂μ|
state_after: no goals
Theorem: leOnePart_mul_oneLePart
File: Mathlib/Algebra/Order/Group/PosPart.lean

tactic: rw [oneLePart, mul_sup, mul_one, leOnePart, sup_mul, one_mul, inv_mul_self, sup_assoc,
  ← @sup_assoc _ _ a, sup_eq_right.2 le_sup_right]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Lattice α
inst✝² : Group α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a✝ a : α
⊢ a⁻ᵐ * a⁺ᵐ = mabs a
state_after: α : Type u_1
β : Type u_2
inst✝³ : Lattice α
inst✝² : Group α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a✝ a : α
⊢ a ⊔ a⁻¹ ⊔ 1 = mabs a

tactic: exact sup_eq_left.2 <| one_le_mabs a
state_before: α : Type u_1
β : Type u_2
inst✝³ : Lattice α
inst✝² : Group α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a✝ a : α
⊢ a ⊔ a⁻¹ ⊔ 1 = mabs a
state_after: no goals
Theorem: Ordnode.dual_insert
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: have : @cmpLE αᵒᵈ _ _ x y = cmpLE y x := rfl
state_before: α : Type u_1
inst✝² : Preorder α
inst✝¹ : IsTotal α fun x x_1 => x ≤ x_1
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x : α
size✝ : ℕ
l : Ordnode α
y : α
r : Ordnode α
⊢ (Ordnode.insert x (node size✝ l y r)).dual = Ordnode.insert x (node size✝ l y r).dual
state_after: α : Type u_1
inst✝² : Preorder α
inst✝¹ : IsTotal α fun x x_1 => x ≤ x_1
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x : α
size✝ : ℕ
l : Ordnode α
y : α
r : Ordnode α
this : cmpLE x y = cmpLE y x
⊢ (Ordnode.insert x (node size✝ l y r)).dual = Ordnode.insert x (node size✝ l y r).dual

tactic: rw [Ordnode.insert, dual, Ordnode.insert, this, ← cmpLE_swap x y]
state_before: α : Type u_1
inst✝² : Preorder α
inst✝¹ : IsTotal α fun x x_1 => x ≤ x_1
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x : α
size✝ : ℕ
l : Ordnode α
y : α
r : Ordnode α
this : cmpLE x y = cmpLE y x
⊢ (Ordnode.insert x (node size✝ l y r)).dual = Ordnode.insert x (node size✝ l y r).dual
state_after: α : Type u_1
inst✝² : Preorder α
inst✝¹ : IsTotal α fun x x_1 => x ≤ x_1
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x : α
size✝ : ℕ
l : Ordnode α
y : α
r : Ordnode α
this : cmpLE x y = cmpLE y x
⊢ (match cmpLE x y with
      | Ordering.lt => (Ordnode.insert x l).balanceL y r
      | Ordering.eq => node size✝ l x r
      | Ordering.gt => l.balanceR y (Ordnode.insert x r)).dual =
    match (cmpLE x y).swap with
    | Ordering.lt => (Ordnode.insert x r.dual).balanceL y l.dual
    | Ordering.eq => node size✝ r.dual x l.dual
    | Ordering.gt => r.dual.balanceR y (Ordnode.insert x l.dual)

tactic: cases cmpLE x y <;>
  simp [Ordering.swap, Ordnode.insert, dual_balanceL, dual_balanceR, dual_insert]
state_before: α : Type u_1
inst✝² : Preorder α
inst✝¹ : IsTotal α fun x x_1 => x ≤ x_1
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x : α
size✝ : ℕ
l : Ordnode α
y : α
r : Ordnode α
this : cmpLE x y = cmpLE y x
⊢ (match cmpLE x y with
      | Ordering.lt => (Ordnode.insert x l).balanceL y r
      | Ordering.eq => node size✝ l x r
      | Ordering.gt => l.balanceR y (Ordnode.insert x r)).dual =
    match (cmpLE x y).swap with
    | Ordering.lt => (Ordnode.insert x r.dual).balanceL y l.dual
    | Ordering.eq => node size✝ r.dual x l.dual
    | Ordering.gt => r.dual.balanceR y (Ordnode.insert x l.dual)
state_after: no goals
Theorem: AList.lookup_insert_eq_none
File: Mathlib/Data/List/AList.lean

tactic: by_cases h : k' = k
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
l : AList β
k k' : α
v : β k
⊢ lookup k' (insert k v l) = none ↔ k' ≠ k ∧ lookup k' l = none
state_after: case pos
α : Type u
β : α → Type v
inst✝ : DecidableEq α
l : AList β
k k' : α
v : β k
h : k' = k
⊢ lookup k' (insert k v l) = none ↔ k' ≠ k ∧ lookup k' l = none

case neg
α : Type u
β : α → Type v
inst✝ : DecidableEq α
l : AList β
k k' : α
v : β k
h : ¬k' = k
⊢ lookup k' (insert k v l) = none ↔ k' ≠ k ∧ lookup k' l = none

tactic: subst h
state_before: case pos
α : Type u
β : α → Type v
inst✝ : DecidableEq α
l : AList β
k k' : α
v : β k
h : k' = k
⊢ lookup k' (insert k v l) = none ↔ k' ≠ k ∧ lookup k' l = none
state_after: case pos
α : Type u
β : α → Type v
inst✝ : DecidableEq α
l : AList β
k' : α
v : β k'
⊢ lookup k' (insert k' v l) = none ↔ k' ≠ k' ∧ lookup k' l = none

tactic: simp
state_before: case pos
α : Type u
β : α → Type v
inst✝ : DecidableEq α
l : AList β
k' : α
v : β k'
⊢ lookup k' (insert k' v l) = none ↔ k' ≠ k' ∧ lookup k' l = none
state_after: no goals

tactic: simp_all [lookup_insert_ne h]
state_before: case neg
α : Type u
β : α → Type v
inst✝ : DecidableEq α
l : AList β
k k' : α
v : β k
h : ¬k' = k
⊢ lookup k' (insert k v l) = none ↔ k' ≠ k ∧ lookup k' l = none
state_after: no goals
Theorem: Polynomial.sum_over_range'
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: rcases p with ⟨⟩
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : AddCommMonoid S
p : R[X]
f : ℕ → R → S
h : ∀ (n : ℕ), f n 0 = 0
n : ℕ
w : p.natDegree < n
⊢ p.sum f = ∑ a ∈ range n, f a (p.coeff a)
state_after: case ofFinsupp
R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : AddCommMonoid S
f : ℕ → R → S
h : ∀ (n : ℕ), f n 0 = 0
n : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
w : { toFinsupp := toFinsupp✝ }.natDegree < n
⊢ { toFinsupp := toFinsupp✝ }.sum f = ∑ a ∈ range n, f a ({ toFinsupp := toFinsupp✝ }.coeff a)

tactic: have := supp_subset_range w
state_before: case ofFinsupp
R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : AddCommMonoid S
f : ℕ → R → S
h : ∀ (n : ℕ), f n 0 = 0
n : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
w : { toFinsupp := toFinsupp✝ }.natDegree < n
⊢ { toFinsupp := toFinsupp✝ }.sum f = ∑ a ∈ range n, f a ({ toFinsupp := toFinsupp✝ }.coeff a)
state_after: case ofFinsupp
R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : AddCommMonoid S
f : ℕ → R → S
h : ∀ (n : ℕ), f n 0 = 0
n : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
w : { toFinsupp := toFinsupp✝ }.natDegree < n
this : { toFinsupp := toFinsupp✝ }.support ⊆ range n
⊢ { toFinsupp := toFinsupp✝ }.sum f = ∑ a ∈ range n, f a ({ toFinsupp := toFinsupp✝ }.coeff a)

tactic: simp only [Polynomial.sum, support, coeff, natDegree, degree] at this ⊢
state_before: case ofFinsupp
R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : AddCommMonoid S
f : ℕ → R → S
h : ∀ (n : ℕ), f n 0 = 0
n : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
w : { toFinsupp := toFinsupp✝ }.natDegree < n
this : { toFinsupp := toFinsupp✝ }.support ⊆ range n
⊢ { toFinsupp := toFinsupp✝ }.sum f = ∑ a ∈ range n, f a ({ toFinsupp := toFinsupp✝ }.coeff a)
state_after: case ofFinsupp
R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : AddCommMonoid S
f : ℕ → R → S
h : ∀ (n : ℕ), f n 0 = 0
n : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
w : { toFinsupp := toFinsupp✝ }.natDegree < n
this : toFinsupp✝.support ⊆ range n
⊢ ∑ x ∈ toFinsupp✝.support, f x (toFinsupp✝ x) = ∑ x ∈ range n, f x (toFinsupp✝ x)

tactic: exact Finsupp.sum_of_support_subset _ this _ fun n _hn => h n
state_before: case ofFinsupp
R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : AddCommMonoid S
f : ℕ → R → S
h : ∀ (n : ℕ), f n 0 = 0
n : ℕ
toFinsupp✝ : AddMonoidAlgebra R ℕ
w : { toFinsupp := toFinsupp✝ }.natDegree < n
this : toFinsupp✝.support ⊆ range n
⊢ ∑ x ∈ toFinsupp✝.support, f x (toFinsupp✝ x) = ∑ x ∈ range n, f x (toFinsupp✝ x)
state_after: no goals
Theorem: FirstOrder.Language.Substructure.mem_closure_iff_exists_term
File: Mathlib/ModelTheory/Substructures.lean

tactic: rw [← SetLike.mem_coe, coe_closure_eq_range_term_realize, mem_range]
state_before: L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : L.Structure M
inst✝¹ : L.Structure N
inst✝ : L.Structure P
S : L.Substructure M
s : Set M
x : M
⊢ x ∈ (closure L).toFun s ↔ ∃ t, Term.realize Subtype.val t = x
state_after: no goals