1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Rat.MulRingNorm.exists_minimal_nat_zero_lt_mulRingNorm_lt_one
File: Mathlib/NumberTheory/Ostrowski.lean

tactic: set P := {m : ℕ | 0 < f ↑m ∧ f ↑m < 1}
state_before: case intro.intro
f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
n : ℕ
hn1 : n ≠ 0
hn2 : f ↑n ≠ 1
⊢ ∃ p, (0 < f ↑p ∧ f ↑p < 1) ∧ ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
state_after: case intro.intro
f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
n : ℕ
hn1 : n ≠ 0
hn2 : f ↑n ≠ 1
P : Set ℕ := {m | 0 < f ↑m ∧ f ↑m < 1}
⊢ ∃ p, (0 < f ↑p ∧ f ↑p < 1) ∧ ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m

tactic: have hP : P.Nonempty :=
  ⟨n, map_pos_of_ne_zero f (Nat.cast_ne_zero.mpr hn1), lt_of_le_of_ne (bdd n) hn2⟩
state_before: case intro.intro
f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
n : ℕ
hn1 : n ≠ 0
hn2 : f ↑n ≠ 1
P : Set ℕ := {m | 0 < f ↑m ∧ f ↑m < 1}
⊢ ∃ p, (0 < f ↑p ∧ f ↑p < 1) ∧ ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
state_after: case intro.intro
f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
n : ℕ
hn1 : n ≠ 0
hn2 : f ↑n ≠ 1
P : Set ℕ := {m | 0 < f ↑m ∧ f ↑m < 1}
hP : P.Nonempty
⊢ ∃ p, (0 < f ↑p ∧ f ↑p < 1) ∧ ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m

tactic: exact ⟨sInf P, Nat.sInf_mem hP, fun m hm ↦ Nat.sInf_le hm⟩
state_before: case intro.intro
f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
n : ℕ
hn1 : n ≠ 0
hn2 : f ↑n ≠ 1
P : Set ℕ := {m | 0 < f ↑m ∧ f ↑m < 1}
hP : P.Nonempty
⊢ ∃ p, (0 < f ↑p ∧ f ↑p < 1) ∧ ∀ (m : ℕ), 0 < f ↑m ∧ f ↑m < 1 → p ≤ m
state_after: no goals

tactic: contrapose! hf_nontriv
state_before: f g : MulRingNorm ℚ
hf_nontriv : f ≠ 1
bdd : ∀ (n : ℕ), f ↑n ≤ 1
⊢ ∃ n, n ≠ 0 ∧ f ↑n ≠ 1
state_after: f g : MulRingNorm ℚ
bdd : ∀ (n : ℕ), f ↑n ≤ 1
hf_nontriv : ∀ (n : ℕ), n ≠ 0 → f ↑n = 1
⊢ f = 1

tactic: rw [← eq_on_nat_iff_eq]
state_before: f g : MulRingNorm ℚ
bdd : ∀ (n : ℕ), f ↑n ≤ 1
hf_nontriv : ∀ (n : ℕ), n ≠ 0 → f ↑n = 1
⊢ f = 1
state_after: f g : MulRingNorm ℚ
bdd : ∀ (n : ℕ), f ↑n ≤ 1
hf_nontriv : ∀ (n : ℕ), n ≠ 0 → f ↑n = 1
⊢ ∀ (n : ℕ), f ↑n = 1 ↑n

tactic: intro n
state_before: f g : MulRingNorm ℚ
bdd : ∀ (n : ℕ), f ↑n ≤ 1
hf_nontriv : ∀ (n : ℕ), n ≠ 0 → f ↑n = 1
⊢ ∀ (n : ℕ), f ↑n = 1 ↑n
state_after: f g : MulRingNorm ℚ
bdd : ∀ (n : ℕ), f ↑n ≤ 1
hf_nontriv : ∀ (n : ℕ), n ≠ 0 → f ↑n = 1
n : ℕ
⊢ f ↑n = 1 ↑n

tactic: rcases eq_or_ne n 0 with rfl | hn0
state_before: f g : MulRingNorm ℚ
bdd : ∀ (n : ℕ), f ↑n ≤ 1
hf_nontriv : ∀ (n : ℕ), n ≠ 0 → f ↑n = 1
n : ℕ
⊢ f ↑n = 1 ↑n
state_after: case inl
f g : MulRingNorm ℚ
bdd : ∀ (n : ℕ), f ↑n ≤ 1
hf_nontriv : ∀ (n : ℕ), n ≠ 0 → f ↑n = 1
⊢ f ↑0 = 1 ↑0

case inr
f g : MulRingNorm ℚ
bdd : ∀ (n : ℕ), f ↑n ≤ 1
hf_nontriv : ∀ (n : ℕ), n ≠ 0 → f ↑n = 1
n : ℕ
hn0 : n ≠ 0
⊢ f ↑n = 1 ↑n

tactic: simp only [Nat.cast_zero, map_zero]
state_before: case inl
f g : MulRingNorm ℚ
bdd : ∀ (n : ℕ), f ↑n ≤ 1
hf_nontriv : ∀ (n : ℕ), n ≠ 0 → f ↑n = 1
⊢ f ↑0 = 1 ↑0
state_after: no goals

tactic: simp only [MulRingNorm.apply_one, Nat.cast_eq_zero, hn0, ↓reduceIte, hf_nontriv n hn0]
state_before: case inr
f g : MulRingNorm ℚ
bdd : ∀ (n : ℕ), f ↑n ≤ 1
hf_nontriv : ∀ (n : ℕ), n ≠ 0 → f ↑n = 1
n : ℕ
hn0 : n ≠ 0
⊢ f ↑n = 1 ↑n
state_after: no goals
Theorem: BddAbove.union
File: Mathlib/Order/Bounds/Basic.lean

tactic: rintro ⟨a, ha⟩ ⟨b, hb⟩
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s✝ t✝ : Set α
a b : α
inst✝ : IsDirected α fun x x_1 => x ≤ x_1
s t : Set α
⊢ BddAbove s → BddAbove t → BddAbove (s ∪ t)
state_after: case intro.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s✝ t✝ : Set α
a✝ b✝ : α
inst✝ : IsDirected α fun x x_1 => x ≤ x_1
s t : Set α
a : α
ha : a ∈ upperBounds s
b : α
hb : b ∈ upperBounds t
⊢ BddAbove (s ∪ t)

tactic: obtain ⟨c, hca, hcb⟩ := exists_ge_ge a b
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s✝ t✝ : Set α
a✝ b✝ : α
inst✝ : IsDirected α fun x x_1 => x ≤ x_1
s t : Set α
a : α
ha : a ∈ upperBounds s
b : α
hb : b ∈ upperBounds t
⊢ BddAbove (s ∪ t)
state_after: case intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s✝ t✝ : Set α
a✝ b✝ : α
inst✝ : IsDirected α fun x x_1 => x ≤ x_1
s t : Set α
a : α
ha : a ∈ upperBounds s
b : α
hb : b ∈ upperBounds t
c : α
hca : a ≤ c
hcb : b ≤ c
⊢ BddAbove (s ∪ t)

tactic: rw [BddAbove, upperBounds_union]
state_before: case intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s✝ t✝ : Set α
a✝ b✝ : α
inst✝ : IsDirected α fun x x_1 => x ≤ x_1
s t : Set α
a : α
ha : a ∈ upperBounds s
b : α
hb : b ∈ upperBounds t
c : α
hca : a ≤ c
hcb : b ≤ c
⊢ BddAbove (s ∪ t)
state_after: case intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s✝ t✝ : Set α
a✝ b✝ : α
inst✝ : IsDirected α fun x x_1 => x ≤ x_1
s t : Set α
a : α
ha : a ∈ upperBounds s
b : α
hb : b ∈ upperBounds t
c : α
hca : a ≤ c
hcb : b ≤ c
⊢ (upperBounds s ∩ upperBounds t).Nonempty

tactic: exact ⟨c, upperBounds_mono_mem hca ha, upperBounds_mono_mem hcb hb⟩
state_before: case intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s✝ t✝ : Set α
a✝ b✝ : α
inst✝ : IsDirected α fun x x_1 => x ≤ x_1
s t : Set α
a : α
ha : a ∈ upperBounds s
b : α
hb : b ∈ upperBounds t
c : α
hca : a ≤ c
hcb : b ≤ c
⊢ (upperBounds s ∩ upperBounds t).Nonempty
state_after: no goals
Theorem: Finset.coe_sup'
File: Mathlib/Data/Finset/Lattice.lean

tactic: rw [sup', WithBot.coe_unbot]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : SemilatticeSup α
s : Finset β
H : s.Nonempty
f : β → α
⊢ ↑(s.sup' H f) = s.sup (WithBot.some ∘ f)
state_after: no goals
Theorem: Finsupp.embDomain_notin_range
File: Mathlib/Data/Finsupp/Defs.lean

tactic: classical
  refine dif_neg (mt (fun h => ?_) h)
  rcases Finset.mem_map.1 h with ⟨a, _h, rfl⟩
  exact Set.mem_range_self a
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
inst✝ : Zero N
f : α ↪ β
v : α →₀ M
a : β
h : a ∉ Set.range ⇑f
⊢ (embDomain f v) a = 0
state_after: no goals

tactic: refine dif_neg (mt (fun h => ?_) h)
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
inst✝ : Zero N
f : α ↪ β
v : α →₀ M
a : β
h : a ∉ Set.range ⇑f
⊢ (embDomain f v) a = 0
state_after: α : 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
inst✝ : Zero N
f : α ↪ β
v : α →₀ M
a : β
h✝ : a ∉ Set.range ⇑f
h : a ∈ map f v.support
⊢ a ∈ Set.range ⇑f

tactic: rcases Finset.mem_map.1 h with ⟨a, _h, rfl⟩
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
inst✝ : Zero N
f : α ↪ β
v : α →₀ M
a : β
h✝ : a ∉ Set.range ⇑f
h : a ∈ map f v.support
⊢ a ∈ Set.range ⇑f
state_after: case intro.intro
α : 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
inst✝ : Zero N
f : α ↪ β
v : α →₀ M
a : α
_h : a ∈ v.support
h✝ : f a ∉ Set.range ⇑f
h : f a ∈ map f v.support
⊢ f a ∈ Set.range ⇑f

tactic: exact Set.mem_range_self a
state_before: case intro.intro
α : 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
inst✝ : Zero N
f : α ↪ β
v : α →₀ M
a : α
_h : a ∈ v.support
h✝ : f a ∉ Set.range ⇑f
h : f a ∈ map f v.support
⊢ f a ∈ Set.range ⇑f
state_after: no goals
Theorem: contMDiffWithinAt_of_not_mem_mulTSupport
File: Mathlib/Geometry/Manifold/ContMDiff/Basic.lean

tactic: apply contMDiffWithinAt_const.congr_of_eventuallyEq
  (eventually_nhdsWithin_of_eventually_nhds <| not_mem_mulTSupport_iff_eventuallyEq.mp hx)
  (image_eq_one_of_nmem_mulTSupport hx)
state_before: 𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹⁵ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹⁴ : TopologicalSpace M
inst✝¹³ : ChartedSpace H M
inst✝¹² : SmoothManifoldWithCorners I M
E' : Type u_5
inst✝¹¹ : NormedAddCommGroup E'
inst✝¹⁰ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁸ : TopologicalSpace M'
inst✝⁷ : ChartedSpace H' M'
inst✝⁶ : SmoothManifoldWithCorners I' M'
E'' : Type u_8
inst✝⁵ : NormedAddCommGroup E''
inst✝⁴ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝³ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝² : TopologicalSpace M''
inst✝¹ : ChartedSpace H'' M''
e : PartialHomeomorph M H
e' : PartialHomeomorph M' H'
f✝ f₁ : M → M'
s✝ s₁ t : Set M
x✝ : M
m n✝ : ℕ∞
f : M → M'
inst✝ : One M'
x : M
hx : x ∉ mulTSupport f
n : ℕ∞
s : Set M
⊢ ContMDiffWithinAt I I' n f s x
state_after: no goals
Theorem: Wbtw.oangle_eq_right
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean

tactic: rw [oangle_rev, h.oangle_eq_left hp₃p₂, ← oangle_rev]
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ p₃' : P
h : Wbtw ℝ p₂ p₃ p₃'
hp₃p₂ : p₃ ≠ p₂
⊢ ∡ p₁ p₂ p₃ = ∡ p₁ p₂ p₃'
state_after: no goals
Theorem: Finset.fiber_nonempty_iff_mem_image
File: Mathlib/Data/Finset/Image.lean

tactic: simp [Finset.Nonempty]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq β
f✝ g : α → β
s✝ : Finset α
t : Finset β
a : α
b c : β
f : α → β
s : Finset α
y : β
⊢ (filter (fun x => f x = y) s).Nonempty ↔ y ∈ image f s
state_after: no goals
Theorem: Hyperreal.IsSt.lt
File: Mathlib/Data/Real/Hyperreal.lean

tactic: rcases ofSeq_surjective x with ⟨f, rfl⟩
state_before: x y : ℝ*
r s : ℝ
hxr : x.IsSt r
hys : y.IsSt s
hrs : r < s
⊢ x < y
state_after: case intro
y : ℝ*
r s : ℝ
hys : y.IsSt s
hrs : r < s
f : ℕ → ℝ
hxr : (ofSeq f).IsSt r
⊢ ofSeq f < y

tactic: rcases ofSeq_surjective y with ⟨g, rfl⟩
state_before: case intro
y : ℝ*
r s : ℝ
hys : y.IsSt s
hrs : r < s
f : ℕ → ℝ
hxr : (ofSeq f).IsSt r
⊢ ofSeq f < y
state_after: case intro.intro
r s : ℝ
hrs : r < s
f : ℕ → ℝ
hxr : (ofSeq f).IsSt r
g : ℕ → ℝ
hys : (ofSeq g).IsSt s
⊢ ofSeq f < ofSeq g

tactic: rw [isSt_ofSeq_iff_tendsto] at hxr hys
state_before: case intro.intro
r s : ℝ
hrs : r < s
f : ℕ → ℝ
hxr : (ofSeq f).IsSt r
g : ℕ → ℝ
hys : (ofSeq g).IsSt s
⊢ ofSeq f < ofSeq g
state_after: case intro.intro
r s : ℝ
hrs : r < s
f : ℕ → ℝ
hxr : Tendsto f (↑(hyperfilter ℕ)) (𝓝 r)
g : ℕ → ℝ
hys : Tendsto g (↑(hyperfilter ℕ)) (𝓝 s)
⊢ ofSeq f < ofSeq g

tactic: exact ofSeq_lt_ofSeq.2 <| hxr.eventually_lt hys hrs
state_before: case intro.intro
r s : ℝ
hrs : r < s
f : ℕ → ℝ
hxr : Tendsto f (↑(hyperfilter ℕ)) (𝓝 r)
g : ℕ → ℝ
hys : Tendsto g (↑(hyperfilter ℕ)) (𝓝 s)
⊢ ofSeq f < ofSeq g
state_after: no goals
Theorem: Matroid.Base.nonempty
File: Mathlib/Data/Matroid/Basic.lean

tactic: rw [nonempty_iff_ne_empty]
state_before: α : Type u_1
M : Matroid α
B : Set α
inst✝ : M.RkPos
hB : M.Base B
⊢ B.Nonempty
state_after: α : Type u_1
M : Matroid α
B : Set α
inst✝ : M.RkPos
hB : M.Base B
⊢ B ≠ ∅

tactic: rintro rfl
state_before: α : Type u_1
M : Matroid α
B : Set α
inst✝ : M.RkPos
hB : M.Base B
⊢ B ≠ ∅
state_after: α : Type u_1
M : Matroid α
inst✝ : M.RkPos
hB : M.Base ∅
⊢ False

tactic: exact M.empty_not_base hB
state_before: α : Type u_1
M : Matroid α
inst✝ : M.RkPos
hB : M.Base ∅
⊢ False
state_after: no goals
Theorem: gold_lt_two
File: Mathlib/Data/Real/GoldenRatio.lean

tactic: calc
(1 + sqrt 5) / 2 < (1 + 3) / 2 := by gcongr; rw [sqrt_lt'] <;> norm_num
_ = 2 := by norm_num
state_before: ⊢ φ < 2
state_after: no goals

tactic: gcongr
state_before: ⊢ (1 + √5) / 2 < (1 + 3) / 2
state_after: case h.bc

⊢ √5 < 3

tactic: rw [sqrt_lt'] <;> norm_num
state_before: case h.bc

⊢ √5 < 3
state_after: no goals

tactic: norm_num
state_before: ⊢ (1 + 3) / 2 = 2
state_after: no goals
Theorem: Zspan.fract_eq_fract
File: Mathlib/Algebra/Module/Zlattice/Basic.lean

tactic: classical
rw [eq_comm, Basis.ext_elem_iff b]
simp_rw [repr_fract_apply, Int.fract_eq_fract, eq_comm, Basis.mem_span_iff_repr_mem,
  sub_eq_neg_add, map_add, map_neg, Finsupp.coe_add, Finsupp.coe_neg, Pi.add_apply,
  Pi.neg_apply, ← eq_intCast (algebraMap ℤ K) _, Set.mem_range]
state_before: E : Type u_1
ι : Type u_2
K : Type u_3
inst✝⁴ : NormedLinearOrderedField K
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace K E
b : Basis ι K E
inst✝¹ : FloorRing K
inst✝ : Fintype ι
m n : E
⊢ fract b m = fract b n ↔ -m + n ∈ span ℤ (Set.range ⇑b)
state_after: no goals

tactic: rw [eq_comm, Basis.ext_elem_iff b]
state_before: E : Type u_1
ι : Type u_2
K : Type u_3
inst✝⁴ : NormedLinearOrderedField K
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace K E
b : Basis ι K E
inst✝¹ : FloorRing K
inst✝ : Fintype ι
m n : E
⊢ fract b m = fract b n ↔ -m + n ∈ span ℤ (Set.range ⇑b)
state_after: E : Type u_1
ι : Type u_2
K : Type u_3
inst✝⁴ : NormedLinearOrderedField K
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace K E
b : Basis ι K E
inst✝¹ : FloorRing K
inst✝ : Fintype ι
m n : E
⊢ (∀ (i : ι), (b.repr (fract b n)) i = (b.repr (fract b m)) i) ↔ -m + n ∈ span ℤ (Set.range ⇑b)

tactic: simp_rw [repr_fract_apply, Int.fract_eq_fract, eq_comm, Basis.mem_span_iff_repr_mem,
  sub_eq_neg_add, map_add, map_neg, Finsupp.coe_add, Finsupp.coe_neg, Pi.add_apply,
  Pi.neg_apply, ← eq_intCast (algebraMap ℤ K) _, Set.mem_range]
state_before: E : Type u_1
ι : Type u_2
K : Type u_3
inst✝⁴ : NormedLinearOrderedField K
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace K E
b : Basis ι K E
inst✝¹ : FloorRing K
inst✝ : Fintype ι
m n : E
⊢ (∀ (i : ι), (b.repr (fract b n)) i = (b.repr (fract b m)) i) ↔ -m + n ∈ span ℤ (Set.range ⇑b)
state_after: no goals
Theorem: WeierstrassCurve.map_Ψ
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean

tactic: simp only [Ψ, map_preΨ, map_ψ₂, ← coe_mapRingHom]
state_before: R : Type r
S : Type s
inst✝¹ : CommRing R
inst✝ : CommRing S
W : WeierstrassCurve R
f : R →+* S
n : ℤ
⊢ (W.map f).Ψ n = Polynomial.map (mapRingHom f) (W.Ψ n)
state_after: R : Type r
S : Type s
inst✝¹ : CommRing R
inst✝ : CommRing S
W : WeierstrassCurve R
f : R →+* S
n : ℤ
⊢ (C ((mapRingHom f) (W.preΨ n)) * if Even n then (mapRingHom (mapRingHom f)) W.ψ₂ else 1) =
    (mapRingHom (mapRingHom f)) (C (W.preΨ n) * if Even n then W.ψ₂ else 1)

tactic: map_simp
state_before: R : Type r
S : Type s
inst✝¹ : CommRing R
inst✝ : CommRing S
W : WeierstrassCurve R
f : R →+* S
n : ℤ
⊢ (C ((mapRingHom f) (W.preΨ n)) * if Even n then (mapRingHom (mapRingHom f)) W.ψ₂ else 1) =
    (mapRingHom (mapRingHom f)) (C (W.preΨ n) * if Even n then W.ψ₂ else 1)
state_after: no goals
Theorem: SimpleGraph.Walk.end_mem_support
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: induction p <;> simp [*]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : G.Walk u v
⊢ v ∈ p.support
state_after: no goals
Theorem: Finset.card_Ico_eq_card_Icc_sub_one
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: by_cases h : a ≤ b
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c a b : α
⊢ (Ico a b).card = (Icc a b).card - 1
state_after: case pos
ι : Type u_1
α : Type u_2
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c a b : α
h : a ≤ b
⊢ (Ico a b).card = (Icc a b).card - 1

case neg
ι : Type u_1
α : Type u_2
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c a b : α
h : ¬a ≤ b
⊢ (Ico a b).card = (Icc a b).card - 1

tactic: rw [Icc_eq_cons_Ico h, card_cons]
state_before: case pos
ι : Type u_1
α : Type u_2
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c a b : α
h : a ≤ b
⊢ (Ico a b).card = (Icc a b).card - 1
state_after: case pos
ι : Type u_1
α : Type u_2
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c a b : α
h : a ≤ b
⊢ (Ico a b).card = (Ico a b).card + 1 - 1

tactic: exact (Nat.add_sub_cancel _ _).symm
state_before: case pos
ι : Type u_1
α : Type u_2
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c a b : α
h : a ≤ b
⊢ (Ico a b).card = (Ico a b).card + 1 - 1
state_after: no goals

tactic: rw [Ico_eq_empty fun h' => h h'.le, Icc_eq_empty h, card_empty, Nat.zero_sub]
state_before: case neg
ι : Type u_1
α : Type u_2
inst✝¹ : PartialOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ c a b : α
h : ¬a ≤ b
⊢ (Ico a b).card = (Icc a b).card - 1
state_after: no goals
Theorem: AffineSubspace.coe_direction_eq_vsub_set_right
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: rw [coe_direction_eq_vsub_set ⟨p, hp⟩]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
p : P
hp : p ∈ s
⊢ ↑s.direction = (fun x => x -ᵥ p) '' ↑s
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
p : P
hp : p ∈ s
⊢ ↑s -ᵥ ↑s = (fun x => x -ᵥ p) '' ↑s

tactic: refine le_antisymm ?_ ?_
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
p : P
hp : p ∈ s
⊢ ↑s -ᵥ ↑s = (fun x => x -ᵥ p) '' ↑s
state_after: case refine_1
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
p : P
hp : p ∈ s
⊢ ↑s -ᵥ ↑s ≤ (fun x => x -ᵥ p) '' ↑s

case refine_2
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
p : P
hp : p ∈ s
⊢ (fun x => x -ᵥ p) '' ↑s ≤ ↑s -ᵥ ↑s

tactic: rintro v ⟨p1, hp1, p2, hp2, rfl⟩
state_before: case refine_1
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
p : P
hp : p ∈ s
⊢ ↑s -ᵥ ↑s ≤ (fun x => x -ᵥ p) '' ↑s
state_after: case refine_1.intro.intro.intro.intro
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
p : P
hp : p ∈ s
p1 : P
hp1 : p1 ∈ ↑s
p2 : P
hp2 : p2 ∈ ↑s
⊢ (fun x x_1 => x -ᵥ x_1) p1 p2 ∈ (fun x => x -ᵥ p) '' ↑s

tactic: exact ⟨p1 -ᵥ p2 +ᵥ p, vadd_mem_of_mem_direction (vsub_mem_direction hp1 hp2) hp, vadd_vsub _ _⟩
state_before: case refine_1.intro.intro.intro.intro
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
p : P
hp : p ∈ s
p1 : P
hp1 : p1 ∈ ↑s
p2 : P
hp2 : p2 ∈ ↑s
⊢ (fun x x_1 => x -ᵥ x_1) p1 p2 ∈ (fun x => x -ᵥ p) '' ↑s
state_after: no goals

tactic: rintro v ⟨p2, hp2, rfl⟩
state_before: case refine_2
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
p : P
hp : p ∈ s
⊢ (fun x => x -ᵥ p) '' ↑s ≤ ↑s -ᵥ ↑s
state_after: case refine_2.intro.intro
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
p : P
hp : p ∈ s
p2 : P
hp2 : p2 ∈ ↑s
⊢ (fun x => x -ᵥ p) p2 ∈ ↑s -ᵥ ↑s

tactic: exact ⟨p2, hp2, p, hp, rfl⟩
state_before: case refine_2.intro.intro
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : AffineSubspace k P
p : P
hp : p ∈ s
p2 : P
hp2 : p2 ∈ ↑s
⊢ (fun x => x -ᵥ p) p2 ∈ ↑s -ᵥ ↑s
state_after: no goals
Theorem: AffineMap.left_vsub_lineMap
File: Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean

tactic: rw [← neg_vsub_eq_vsub_rev, lineMap_vsub_left, ← smul_neg, neg_vsub_eq_vsub_rev]
state_before: k : Type u_1
V1 : Type u_2
P1 : Type u_3
V2 : Type u_4
P2 : Type u_5
V3 : Type u_6
P3 : Type u_7
V4 : Type u_8
P4 : Type u_9
inst✝¹² : Ring k
inst✝¹¹ : AddCommGroup V1
inst✝¹⁰ : Module k V1
inst✝⁹ : AffineSpace V1 P1
inst✝⁸ : AddCommGroup V2
inst✝⁷ : Module k V2
inst✝⁶ : AffineSpace V2 P2
inst✝⁵ : AddCommGroup V3
inst✝⁴ : Module k V3
inst✝³ : AffineSpace V3 P3
inst✝² : AddCommGroup V4
inst✝¹ : Module k V4
inst✝ : AffineSpace V4 P4
p₀ p₁ : P1
c : k
⊢ p₀ -ᵥ (lineMap p₀ p₁) c = c • (p₀ -ᵥ p₁)
state_after: no goals
Theorem: List.foldr_const
File: Mathlib/Logic/Function/Iterate.lean

tactic: rw [length_cons, foldr, foldr_const f b l, iterate_succ_apply']
state_before: α : Type u
β : Type v
f : β → β
b : β
a : α
l : List α
⊢ foldr (fun x => f) b (a :: l) = f^[(a :: l).length] b
state_after: no goals
Theorem: Finset.inter_univ
File: Mathlib/Data/Fintype/Basic.lean

tactic: rw [inter_comm, univ_inter]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Fintype α
s✝ t : Finset α
inst✝ : DecidableEq α
a : α
s : Finset α
⊢ s ∩ univ = s
state_after: no goals
Theorem: Cardinal.mk_insert
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rw [← union_singleton, mk_union_of_disjoint, mk_singleton]
state_before: α✝ β : Type u
c : Cardinal.{?u.215303}
α : Type u
s : Set α
a : α
h : a ∉ s
⊢ #↑(insert a s) = #↑s + 1
state_after: α✝ β : Type u
c : Cardinal.{?u.215303}
α : Type u
s : Set α
a : α
h : a ∉ s
⊢ Disjoint s {a}

tactic: simpa
state_before: α✝ β : Type u
c : Cardinal.{?u.215303}
α : Type u
s : Set α
a : α
h : a ∉ s
⊢ Disjoint s {a}
state_after: no goals
Theorem: UpperHalfPlane.image_coe_sphere
File: Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean

tactic: ext w
state_before: z✝ w : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
⊢ UpperHalfPlane.coe '' sphere z r = sphere (↑(z.center r)) (z.im * Real.sinh r)
state_after: case h
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℂ
⊢ w ∈ UpperHalfPlane.coe '' sphere z r ↔ w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r)

tactic: constructor
state_before: case h
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℂ
⊢ w ∈ UpperHalfPlane.coe '' sphere z r ↔ w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r)
state_after: case h.mp
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℂ
⊢ w ∈ UpperHalfPlane.coe '' sphere z r → w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r)

case h.mpr
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℂ
⊢ w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r) → w ∈ UpperHalfPlane.coe '' sphere z r

tactic: rintro ⟨w, hw, rfl⟩
state_before: case h.mp
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℂ
⊢ w ∈ UpperHalfPlane.coe '' sphere z r → w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r)
state_after: case h.mp.intro.intro
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℍ
hw : w ∈ sphere z r
⊢ ↑w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r)

tactic: exact dist_eq_iff_dist_coe_center_eq.1 hw
state_before: case h.mp.intro.intro
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℍ
hw : w ∈ sphere z r
⊢ ↑w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r)
state_after: no goals

tactic: intro hw
state_before: case h.mpr
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℂ
⊢ w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r) → w ∈ UpperHalfPlane.coe '' sphere z r
state_after: case h.mpr
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℂ
hw : w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r)
⊢ w ∈ UpperHalfPlane.coe '' sphere z r

tactic: lift w to ℍ using im_pos_of_dist_center_le (sphere_subset_closedBall hw)
state_before: case h.mpr
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℂ
hw : w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r)
⊢ w ∈ UpperHalfPlane.coe '' sphere z r
state_after: case h.mpr.intro
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℍ
hw : ↑w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r)
⊢ ↑w ∈ UpperHalfPlane.coe '' sphere z r

tactic: exact mem_image_of_mem _ (dist_eq_iff_dist_coe_center_eq.2 hw)
state_before: case h.mpr.intro
z✝ w✝ : ℍ
r✝ R : ℝ
z : ℍ
r : ℝ
w : ℍ
hw : ↑w ∈ sphere (↑(z.center r)) (z.im * Real.sinh r)
⊢ ↑w ∈ UpperHalfPlane.coe '' sphere z r
state_after: no goals