1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: antilipschitzWith_inv_iff
File: Mathlib/Analysis/Normed/Group/Uniform.lean

tactic: simp [AntilipschitzWith]
state_before: 𝓕 : Type u_1
α✝ : Type u_2
E✝ : Type u_3
F : Type u_4
inst✝³ : SeminormedCommGroup E✝
inst✝² : SeminormedCommGroup F
a a₁ a₂ b b₁ b₂ : E✝
r r₁ r₂ : ℝ
α : Type u_5
E : Type u_6
inst✝¹ : SeminormedCommGroup E
inst✝ : PseudoEMetricSpace α
K Kf Kg : ℝ≥0
f g : α → E
s : Set α
x : α
⊢ AntilipschitzWith K f⁻¹ ↔ AntilipschitzWith K f
state_after: no goals
Theorem: PartialEquiv.image_source_inter_eq'
File: Mathlib/Logic/Equiv/PartialEquiv.lean

tactic: rw [inter_comm, e.leftInvOn.image_inter', image_source_eq_target, inter_comm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
e : PartialEquiv α β
e' : PartialEquiv β γ
s : Set α
⊢ ↑e '' (e.source ∩ s) = e.target ∩ ↑e.symm ⁻¹' s
state_after: no goals
Theorem: equicontinuous_finite
File: Mathlib/Topology/UniformSpace/Equicontinuity.lean

tactic: simp only [Equicontinuous, equicontinuousAt_finite, continuous_iff_continuousAt, @forall_swap ι]
state_before: ι : Type u_1
κ : Type u_2
X : Type u_3
X' : Type u_4
Y : Type u_5
Z : Type u_6
α : Type u_7
α' : Type u_8
β : Type u_9
β' : Type u_10
γ : Type u_11
𝓕 : Type u_12
tX : TopologicalSpace X
tY : TopologicalSpace Y
tZ : TopologicalSpace Z
uα : UniformSpace α
uβ : UniformSpace β
uγ : UniformSpace γ
inst✝ : Finite ι
F : ι → X → α
⊢ Equicontinuous F ↔ ∀ (i : ι), Continuous (F i)
state_after: no goals
Theorem: FinEnum.nodup_toList
File: Mathlib/Data/FinEnum.lean

tactic: simp [toList]
state_before: α : Type u
β : α → Type v
inst✝ : FinEnum α
⊢ (toList α).Nodup
state_after: α : Type u
β : α → Type v
inst✝ : FinEnum α
⊢ (List.map (⇑equiv.symm) (List.finRange (card α))).Nodup

tactic: apply List.Nodup.map <;> [apply Equiv.injective; apply List.nodup_finRange]
state_before: α : Type u
β : α → Type v
inst✝ : FinEnum α
⊢ (List.map (⇑equiv.symm) (List.finRange (card α))).Nodup
state_after: no goals
Theorem: String.firstDiffPos_eq
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: simpa [firstDiffPos] using
  firstDiffPos_loop_eq [] [] a.1 b.1 ((utf8Len a.1).min (utf8Len b.1)) 0 rfl rfl (by simp)
state_before: a b : String
⊢ a.firstDiffPos b = { byteIdx := utf8Len (List.takeWhile₂ (fun x x_1 => decide (x = x_1)) a.data b.data).fst }
state_after: no goals

tactic: simp
state_before: a b : String
⊢ (utf8Len a.data).min (utf8Len b.data) = min (utf8Len [] + utf8Len a.data) (utf8Len [] + utf8Len b.data)
state_after: no goals
Theorem: Set.range_IciExtend
File: Mathlib/Order/Interval/Set/ProjIcc.lean

tactic: simp only [IciExtend, range_comp f, range_projIci, range_id', image_univ]
state_before: α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
a b : α
h : a ≤ b
x : α
f : ↑(Ici a) → β
⊢ range (IciExtend f) = range f
state_after: no goals
Theorem: Nat.self_add_sub_one
File: Mathlib/Data/Nat/Defs.lean

tactic: rw [Nat.two_mul]
state_before: a b c d m n✝ k : ℕ
p q : ℕ → Prop
n : ℕ
⊢ n + 1 + (n + 1 - 1) = 2 * (n + 1) - 1
state_after: a b c d m n✝ k : ℕ
p q : ℕ → Prop
n : ℕ
⊢ n + 1 + (n + 1 - 1) = n + 1 + (n + 1) - 1

tactic: exact (add_succ_sub_one (Nat.succ _) _).symm
state_before: a b c d m n✝ k : ℕ
p q : ℕ → Prop
n : ℕ
⊢ n + 1 + (n + 1 - 1) = n + 1 + (n + 1) - 1
state_after: no goals
Theorem: Matrix.fromRows_mul
File: Mathlib/Data/Matrix/ColumnRowPartitioned.lean

tactic: ext (_ | _) _ <;> simp [mul_apply]
state_before: R : Type u_1
m : Type u_2
m₁ : Type u_3
m₂ : Type u_4
n : Type u_5
n₁ : Type u_6
n₂ : Type u_7
inst✝¹² : Fintype m
inst✝¹¹ : Fintype m₁
inst✝¹⁰ : Fintype m₂
inst✝⁹ : Fintype n
inst✝⁸ : Fintype n₁
inst✝⁷ : Fintype n₂
inst✝⁶ : DecidableEq m
inst✝⁵ : DecidableEq m₁
inst✝⁴ : DecidableEq m₂
inst✝³ : DecidableEq n
inst✝² : DecidableEq n₁
inst✝¹ : DecidableEq n₂
inst✝ : Semiring R
A₁ : Matrix m₁ n R
A₂ : Matrix m₂ n R
B : Matrix n m R
⊢ A₁.fromRows A₂ * B = (A₁ * B).fromRows (A₂ * B)
state_after: no goals
Theorem: GeneralizedContinuedFraction.IntFractPair.stream_isSeq
File: Mathlib/Algebra/ContinuedFractions/Computation/Basic.lean

tactic: intro _ hyp
state_before: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
⊢ (IntFractPair.stream v).IsSeq
state_after: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n✝ : ℕ
hyp : IntFractPair.stream v n✝ = none
⊢ IntFractPair.stream v (n✝ + 1) = none

tactic: simp [IntFractPair.stream, hyp]
state_before: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n✝ : ℕ
hyp : IntFractPair.stream v n✝ = none
⊢ IntFractPair.stream v (n✝ + 1) = none
state_after: no goals
Theorem: List.length_ofFn
File: Mathlib/Data/List/OfFn.lean

tactic: simp [ofFn, length_ofFn_go]
state_before: α : Type u
n : ℕ
f : Fin n → α
⊢ (ofFn f).length = n
state_after: no goals
Theorem: LinearMap.polyCharpoly_coeff_eval
File: Mathlib/Algebra/Module/LinearMap/Polynomial.lean

tactic: rw [polyCharpoly, polyCharpolyAux_coeff_eval]
state_before: R : Type u_1
L : Type u_2
M : Type u_3
n : Type u_4
ι : Type u_5
ι' : Type u_6
ιM : Type u_7
inst✝¹¹ : CommRing R
inst✝¹⁰ : AddCommGroup L
inst✝⁹ : Module R L
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
φ : L →ₗ[R] Module.End R M
inst✝⁶ : Fintype ι
inst✝⁵ : Fintype ι'
inst✝⁴ : Fintype ιM
inst✝³ : DecidableEq ι
inst✝² : DecidableEq ι'
inst✝¹ : Module.Free R M
inst✝ : Module.Finite R M
b : Basis ι R L
x : L
i : ℕ
⊢ (MvPolynomial.eval ⇑(b.repr x)) ((φ.polyCharpoly b).coeff i) = (charpoly (φ x)).coeff i
state_after: no goals
Theorem: Cardinal.nat_lt_ofENat
File: Mathlib/SetTheory/Cardinal/ENat.lean

tactic: norm_cast
state_before: m : ℕ
n : ℕ∞
⊢ ↑m < ↑n ↔ ↑m < n
state_after: no goals
Theorem: GeneralizedContinuedFraction.exists_rat_eq_nth_numerator
File: Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean

tactic: rcases exists_gcf_pair_rat_eq_nth_conts v n with ⟨⟨a, _⟩, nth_cont_eq⟩
state_before: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
⊢ ∃ q, (of v).numerators n = ↑q
state_after: case intro.mk
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
a b✝ : ℚ
nth_cont_eq : (of v).continuants n = Pair.map Rat.cast { a := a, b := b✝ }
⊢ ∃ q, (of v).numerators n = ↑q

tactic: use a
state_before: case intro.mk
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
a b✝ : ℚ
nth_cont_eq : (of v).continuants n = Pair.map Rat.cast { a := a, b := b✝ }
⊢ ∃ q, (of v).numerators n = ↑q
state_after: case h
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
a b✝ : ℚ
nth_cont_eq : (of v).continuants n = Pair.map Rat.cast { a := a, b := b✝ }
⊢ (of v).numerators n = ↑a

tactic: simp [num_eq_conts_a, nth_cont_eq]
state_before: case h
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
n : ℕ
a b✝ : ℚ
nth_cont_eq : (of v).continuants n = Pair.map Rat.cast { a := a, b := b✝ }
⊢ (of v).numerators n = ↑a
state_after: no goals
Theorem: Subsemigroup.mem_iInf
File: Mathlib/Algebra/Group/Subsemigroup/Basic.lean

tactic: simp only [iInf, mem_sInf, Set.forall_mem_range]
state_before: M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : Mul M
s : Set M
inst✝ : Add A
t : Set A
S✝ : Subsemigroup M
ι : Sort u_4
S : ι → Subsemigroup M
x : M
⊢ x ∈ ⨅ i, S i ↔ ∀ (i : ι), x ∈ S i
state_after: no goals
Theorem: BoxIntegral.Prepartition.mem_restrict
File: Mathlib/Analysis/BoxIntegral/Partition/Basic.lean

tactic: simp [restrict, eq_comm]
state_before: ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi πi₁ πi₂ : (J : Box ι) → Prepartition J
⊢ J₁ ∈ π.restrict J ↔ ∃ J' ∈ π, ↑J₁ = ↑J ⊓ ↑J'
state_after: no goals
Theorem: Set.einfsep_eq_iInf
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: refine eq_of_forall_le_iff fun _ => ?_
state_before: α : Type u_1
β : Type u_2
inst✝ : EDist α
x y : α
s t : Set α
⊢ s.einfsep = ⨅ d, uncurry edist ↑d
state_after: α : Type u_1
β : Type u_2
inst✝ : EDist α
x y : α
s t : Set α
x✝ : ℝ≥0∞
⊢ x✝ ≤ s.einfsep ↔ x✝ ≤ ⨅ d, uncurry edist ↑d

tactic: simp_rw [le_einfsep_iff, le_iInf_iff, imp_forall_iff, SetCoe.forall, mem_offDiag,
  Prod.forall, uncurry_apply_pair, and_imp]
state_before: α : Type u_1
β : Type u_2
inst✝ : EDist α
x y : α
s t : Set α
x✝ : ℝ≥0∞
⊢ x✝ ≤ s.einfsep ↔ x✝ ≤ ⨅ d, uncurry edist ↑d
state_after: no goals
Theorem: CharP.exists'
File: Mathlib/Algebra/CharP/Defs.lean

tactic: obtain ⟨p, hchar⟩ := CharP.exists R
state_before: R✝ : Type u_1
inst✝⁵ : NonAssocSemiring R✝
inst✝⁴ : NoZeroDivisors R✝
inst✝³ : Nontrivial R✝
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
⊢ CharZero R ∨ ∃ p, Fact (Nat.Prime p) ∧ CharP R p
state_after: case intro
R✝ : Type u_1
inst✝⁵ : NonAssocSemiring R✝
inst✝⁴ : NoZeroDivisors R✝
inst✝³ : Nontrivial R✝
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
p : ℕ
hchar : CharP R p
⊢ CharZero R ∨ ∃ p, Fact (Nat.Prime p) ∧ CharP R p

tactic: rcases char_is_prime_or_zero R p with h | rfl
state_before: case intro
R✝ : Type u_1
inst✝⁵ : NonAssocSemiring R✝
inst✝⁴ : NoZeroDivisors R✝
inst✝³ : Nontrivial R✝
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
p : ℕ
hchar : CharP R p
⊢ CharZero R ∨ ∃ p, Fact (Nat.Prime p) ∧ CharP R p
state_after: case intro.inl
R✝ : Type u_1
inst✝⁵ : NonAssocSemiring R✝
inst✝⁴ : NoZeroDivisors R✝
inst✝³ : Nontrivial R✝
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
p : ℕ
hchar : CharP R p
h : Nat.Prime p
⊢ CharZero R ∨ ∃ p, Fact (Nat.Prime p) ∧ CharP R p

case intro.inr
R✝ : Type u_1
inst✝⁵ : NonAssocSemiring R✝
inst✝⁴ : NoZeroDivisors R✝
inst✝³ : Nontrivial R✝
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
hchar : CharP R 0
⊢ CharZero R ∨ ∃ p, Fact (Nat.Prime p) ∧ CharP R p

tactic: exacts [Or.inr ⟨p, Fact.mk h, hchar⟩, Or.inl (charP_to_charZero R)]
state_before: case intro.inl
R✝ : Type u_1
inst✝⁵ : NonAssocSemiring R✝
inst✝⁴ : NoZeroDivisors R✝
inst✝³ : Nontrivial R✝
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
p : ℕ
hchar : CharP R p
h : Nat.Prime p
⊢ CharZero R ∨ ∃ p, Fact (Nat.Prime p) ∧ CharP R p

case intro.inr
R✝ : Type u_1
inst✝⁵ : NonAssocSemiring R✝
inst✝⁴ : NoZeroDivisors R✝
inst✝³ : Nontrivial R✝
R : Type u_2
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
hchar : CharP R 0
⊢ CharZero R ∨ ∃ p, Fact (Nat.Prime p) ∧ CharP R p
state_after: no goals
Theorem: MonoidHom.comp_coprod
File: Mathlib/Algebra/Group/Prod.lean

tactic: simp
state_before: A : Type u_1
B : Type u_2
G : Type u_3
H : Type u_4
M : Type u_5
N : Type u_6
P : Type u_7
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : CommMonoid P
f✝ : M →* P
g✝ : N →* P
Q : Type u_8
inst✝ : CommMonoid Q
h : P →* Q
f : M →* P
g : N →* P
x : M × N
⊢ (h.comp (f.coprod g)) x = ((h.comp f).coprod (h.comp g)) x
state_after: no goals
Theorem: Finsupp.graph_zero
File: Mathlib/Data/Finsupp/Basic.lean

tactic: simp [graph]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : Zero M
⊢ graph 0 = ∅
state_after: no goals
Theorem: CategoryTheory.Limits.biprod.add_eq_lift_id_desc
File: Mathlib/CategoryTheory/Preadditive/Biproducts.lean

tactic: simp
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Preadditive C
X Y : C
f g : X ⟶ Y
inst✝ : HasBinaryBiproduct X X
⊢ f + g = lift (𝟙 X) (𝟙 X) ≫ desc f g
state_after: no goals
Theorem: LinearPMap.IsClosable.closure_isClosed
File: Mathlib/Topology/Algebra/Module/LinearPMap.lean

tactic: rw [IsClosed, ← hf.graph_closure_eq_closure_graph]
state_before: R : Type u_1
E : Type u_2
F : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : AddCommGroup E
inst✝⁹ : AddCommGroup F
inst✝⁸ : Module R E
inst✝⁷ : Module R F
inst✝⁶ : TopologicalSpace E
inst✝⁵ : TopologicalSpace F
inst✝⁴ : ContinuousAdd E
inst✝³ : ContinuousAdd F
inst✝² : TopologicalSpace R
inst✝¹ : ContinuousSMul R E
inst✝ : ContinuousSMul R F
f : E →ₗ.[R] F
hf : f.IsClosable
⊢ f.closure.IsClosed
state_after: R : Type u_1
E : Type u_2
F : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : AddCommGroup E
inst✝⁹ : AddCommGroup F
inst✝⁸ : Module R E
inst✝⁷ : Module R F
inst✝⁶ : TopologicalSpace E
inst✝⁵ : TopologicalSpace F
inst✝⁴ : ContinuousAdd E
inst✝³ : ContinuousAdd F
inst✝² : TopologicalSpace R
inst✝¹ : ContinuousSMul R E
inst✝ : ContinuousSMul R F
f : E →ₗ.[R] F
hf : f.IsClosable
⊢ _root_.IsClosed ↑f.graph.topologicalClosure

tactic: exact f.graph.isClosed_topologicalClosure
state_before: R : Type u_1
E : Type u_2
F : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : AddCommGroup E
inst✝⁹ : AddCommGroup F
inst✝⁸ : Module R E
inst✝⁷ : Module R F
inst✝⁶ : TopologicalSpace E
inst✝⁵ : TopologicalSpace F
inst✝⁴ : ContinuousAdd E
inst✝³ : ContinuousAdd F
inst✝² : TopologicalSpace R
inst✝¹ : ContinuousSMul R E
inst✝ : ContinuousSMul R F
f : E →ₗ.[R] F
hf : f.IsClosable
⊢ _root_.IsClosed ↑f.graph.topologicalClosure
state_after: no goals
Theorem: toIcoDiv_sub'
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simpa only [one_zsmul] using toIcoDiv_sub_zsmul' hp a b 1
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIcoDiv hp (a - p) b = toIcoDiv hp a b + 1
state_after: no goals
Theorem: SimpleGraph.transpose_adjMatrix
File: Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean

tactic: ext
state_before: V : Type u_1
α : Type u_2
β : Type u_3
G : SimpleGraph V
inst✝² : DecidableRel G.Adj
inst✝¹ : Zero α
inst✝ : One α
⊢ (adjMatrix α G)ᵀ = adjMatrix α G
state_after: case a
V : Type u_1
α : Type u_2
β : Type u_3
G : SimpleGraph V
inst✝² : DecidableRel G.Adj
inst✝¹ : Zero α
inst✝ : One α
i✝ j✝ : V
⊢ (adjMatrix α G)ᵀ i✝ j✝ = adjMatrix α G i✝ j✝

tactic: simp [adj_comm]
state_before: case a
V : Type u_1
α : Type u_2
β : Type u_3
G : SimpleGraph V
inst✝² : DecidableRel G.Adj
inst✝¹ : Zero α
inst✝ : One α
i✝ j✝ : V
⊢ (adjMatrix α G)ᵀ i✝ j✝ = adjMatrix α G i✝ j✝
state_after: no goals
Theorem: SimpleGraph.Coloring.card_colorClasses_le
File: Mathlib/Combinatorics/SimpleGraph/Coloring.lean

tactic: simp [colorClasses]
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
inst✝¹ : Fintype α
inst✝ : Fintype ↑C.colorClasses
⊢ card ↑C.colorClasses ≤ card α
state_after: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
inst✝¹ : Fintype α
inst✝ : Fintype ↑C.colorClasses
⊢ card ↑(Setoid.ker ⇑C).classes ≤ card α

tactic: haveI : Fintype (Setoid.classes (Setoid.ker C)) := by assumption
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
inst✝¹ : Fintype α
inst✝ : Fintype ↑C.colorClasses
⊢ card ↑(Setoid.ker ⇑C).classes ≤ card α
state_after: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
inst✝¹ : Fintype α
inst✝ : Fintype ↑C.colorClasses
this : Fintype ↑(Setoid.ker ⇑C).classes
⊢ card ↑(Setoid.ker ⇑C).classes ≤ card α

tactic: convert Setoid.card_classes_ker_le C
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
inst✝¹ : Fintype α
inst✝ : Fintype ↑C.colorClasses
this : Fintype ↑(Setoid.ker ⇑C).classes
⊢ card ↑(Setoid.ker ⇑C).classes ≤ card α
state_after: no goals

tactic: assumption
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
inst✝¹ : Fintype α
inst✝ : Fintype ↑C.colorClasses
⊢ Fintype ↑(Setoid.ker ⇑C).classes
state_after: no goals
Theorem: ltByCases_comm
File: Mathlib/Order/Basic.lean

tactic: refine ltByCases x y (fun h => ?_) (fun h => ?_) (fun h => ?_)
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : optParam (y = x → x = y) ⋯
⊢ ltByCases x y h₁ h₂ h₃ = ltByCases y x h₃ (h₂ ∘ p) h₁
state_after: case refine_1
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : optParam (y = x → x = y) ⋯
h : x < y
⊢ ltByCases x y h₁ h₂ h₃ = ltByCases y x h₃ (h₂ ∘ p) h₁

case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : optParam (y = x → x = y) ⋯
h : x = y
⊢ ltByCases x y h₁ h₂ h₃ = ltByCases y x h₃ (h₂ ∘ p) h₁

case refine_3
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : optParam (y = x → x = y) ⋯
h : y < x
⊢ ltByCases x y h₁ h₂ h₃ = ltByCases y x h₃ (h₂ ∘ p) h₁

tactic: rw [ltByCases_lt h, ltByCases_gt h]
state_before: case refine_1
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : optParam (y = x → x = y) ⋯
h : x < y
⊢ ltByCases x y h₁ h₂ h₃ = ltByCases y x h₃ (h₂ ∘ p) h₁
state_after: no goals

tactic: rw [ltByCases_eq h, ltByCases_eq h.symm, comp_apply]
state_before: case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : optParam (y = x → x = y) ⋯
h : x = y
⊢ ltByCases x y h₁ h₂ h₃ = ltByCases y x h₃ (h₂ ∘ p) h₁
state_after: no goals

tactic: rw [ltByCases_lt h, ltByCases_gt h]
state_before: case refine_3
ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : LinearOrder α
P : Sort u_5
x y : α
h₁ : x < y → P
h₂ : x = y → P
h₃ : y < x → P
p : optParam (y = x → x = y) ⋯
h : y < x
⊢ ltByCases x y h₁ h₂ h₃ = ltByCases y x h₃ (h₂ ∘ p) h₁
state_after: no goals
Theorem: Set.image_perm
File: Mathlib/Data/Set/Image.lean

tactic: ext i
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
⊢ ⇑σ '' s = s
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
⊢ i ∈ ⇑σ '' s ↔ i ∈ s

tactic: obtain hi | hi := eq_or_ne (σ i) i
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
⊢ i ∈ ⇑σ '' s ↔ i ∈ s
state_after: case h.inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
hi : σ i = i
⊢ i ∈ ⇑σ '' s ↔ i ∈ s

case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
hi : σ i ≠ i
⊢ i ∈ ⇑σ '' s ↔ i ∈ s

tactic: refine ⟨?_, fun h => ⟨i, h, hi⟩⟩
state_before: case h.inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
hi : σ i = i
⊢ i ∈ ⇑σ '' s ↔ i ∈ s
state_after: case h.inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
hi : σ i = i
⊢ i ∈ ⇑σ '' s → i ∈ s

tactic: rintro ⟨j, hj, h⟩
state_before: case h.inl
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
hi : σ i = i
⊢ i ∈ ⇑σ '' s → i ∈ s
state_after: case h.inl.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
hi : σ i = i
j : α
hj : j ∈ s
h : σ j = i
⊢ i ∈ s

tactic: rwa [σ.injective (hi.trans h.symm)]
state_before: case h.inl.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
hi : σ i = i
j : α
hj : j ∈ s
h : σ j = i
⊢ i ∈ s
state_after: no goals

tactic: refine iff_of_true ⟨σ.symm i, hs fun h => hi ?_, σ.apply_symm_apply _⟩ (hs hi)
state_before: case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
hi : σ i ≠ i
⊢ i ∈ ⇑σ '' s ↔ i ∈ s
state_after: case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
hi : σ i ≠ i
h : σ ((Equiv.symm σ) i) = (Equiv.symm σ) i
⊢ σ i = i

tactic: convert congr_arg σ h <;> exact (σ.apply_symm_apply _).symm
state_before: case h.inr
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s✝ t s : Set α
σ : Equiv.Perm α
hs : {a | σ a ≠ a} ⊆ s
i : α
hi : σ i ≠ i
h : σ ((Equiv.symm σ) i) = (Equiv.symm σ) i
⊢ σ i = i
state_after: no goals
Theorem: AddSubmonoid.bot_mul
File: Mathlib/Algebra/Group/Submonoid/Pointwise.lean

tactic: rw [AddSubmonoid.mem_bot] at hm ⊢
state_before: α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
inst✝ : NonUnitalNonAssocSemiring R
S : AddSubmonoid R
m : R
hm : m ∈ ⊥
n : R
hn : n ∈ S
⊢ m * n ∈ ⊥
state_after: α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
inst✝ : NonUnitalNonAssocSemiring R
S : AddSubmonoid R
m : R
hm : m = 0
n : R
hn : n ∈ S
⊢ m * n = 0

tactic: rw [hm, zero_mul]
state_before: α : Type u_1
G : Type u_2
M : Type u_3
R : Type u_4
A : Type u_5
inst✝² : Monoid M
inst✝¹ : AddMonoid A
inst✝ : NonUnitalNonAssocSemiring R
S : AddSubmonoid R
m : R
hm : m = 0
n : R
hn : n ∈ S
⊢ m * n = 0
state_after: no goals
Theorem: RingQuot.Rel.neg
File: Mathlib/Algebra/RingQuot.lean

tactic: simp only [neg_eq_neg_one_mul a, neg_eq_neg_one_mul b, Rel.mul_right h]
state_before: R✝ : Type uR
inst✝⁴ : Semiring R✝
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
R : Type uR
inst✝ : Ring R
r : R → R → Prop
a b : R
h : Rel r a b
⊢ Rel r (-a) (-b)
state_after: no goals
Theorem: IsSemisimpleModule.exists_simple_submodule
File: Mathlib/RingTheory/SimpleModule.lean

tactic: simpa only [isSimpleModule_iff_isAtom] using IsAtomic.exists_atom _
state_before: ι : Type u_1
R : Type u_2
S : Type u_3
inst✝⁷ : Ring R
inst✝⁶ : Ring S
M : Type u_4
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
m : Submodule R M
N : Type u_5
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : IsSemisimpleModule R M
inst✝ : Nontrivial M
⊢ ∃ m, IsSimpleModule R ↥m
state_after: no goals
Theorem: midpoint_zero_add
File: Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean

tactic: simp [sub_add_eq_sub_sub_swap]
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁷ : Ring R
inst✝⁶ : Invertible 2
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x✝ y✝ z : P
x y : V
⊢ 0 -ᵥ x = y -ᵥ (x + y)
state_after: no goals
Theorem: disjoint_nhdsSet_nhds
File: Mathlib/Topology/Separation.lean

tactic: have h := (regularSpace_TFAE X).out 0 2
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
⊢ Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
h : RegularSpace X ↔ ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s
⊢ Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s

tactic: exact h.mp ‹_› _ _
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
h : RegularSpace X ↔ ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s
⊢ Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s
state_after: no goals
Theorem: IsOfFinOrder.eq_one
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: obtain ⟨n, hn, ha⟩ := ha.exists_pow_eq_one
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedSemiring G
a : G
ha₀ : 0 ≤ a
ha : IsOfFinOrder a
⊢ a = 1
state_after: case intro.intro
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedSemiring G
a : G
ha₀ : 0 ≤ a
ha✝ : IsOfFinOrder a
n : ℕ
hn : 0 < n
ha : a ^ n = 1
⊢ a = 1

tactic: exact (pow_eq_one_iff_of_nonneg ha₀ hn.ne').1 ha
state_before: case intro.intro
G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : LinearOrderedSemiring G
a : G
ha₀ : 0 ≤ a
ha✝ : IsOfFinOrder a
n : ℕ
hn : 0 < n
ha : a ^ n = 1
⊢ a = 1
state_after: no goals