tasksource/leandojo huggingface dataset:
Theorem: Computable.map_decode_iff
File: Mathlib/Computability/Partrec.lean

tactic: convert (bind_decode_iff (f := fun a => Option.some ∘ f a)).trans option_some_iff
state_before: α : Type u_1
β : Type u_3
γ : Type ?u.160634
σ : Type u_2
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → β → σ
⊢ (Computable₂ fun a n => Option.map (f a) (decode n)) ↔ Computable₂ f

tactic: apply Option.map_eq_bind
state_before: case h.e'_1.h.e'_7.h.h
α : Type u_1
β : Type u_3
γ : Type ?u.160634
σ : Type u_2
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → β → σ
x✝¹ : α
x✝ : ℕ
⊢ Option.map (f x✝¹) (decode x✝) = Option.bind (decode x✝) (Option.some ∘ f x✝¹)
Theorem: Path.extend_zero
File: Mathlib/Topology/PathConnected.lean

tactic: simp
state_before: X : Type u_1
Y : Type ?u.149853
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.149868
γ : Path x y
⊢ extend γ 0 = x
Theorem: Matrix.invOf_submatrix_equiv_eq
File: Mathlib/LinearAlgebra/Matrix/NonsingularInverse.lean

tactic: letI := submatrixEquivInvertible A e₁ e₂
state_before: l : Type ?u.381588
m : Type u
n : Type u'
α : Type v
inst✝⁶ : Fintype n
inst✝⁵ : DecidableEq n
inst✝⁴ : CommRing α
A✝ B : Matrix n n α
inst✝³ : Fintype m
inst✝² : DecidableEq m
A : Matrix m m α
e₁ e₂ : n ≃ m
inst✝¹ : Invertible A
inst✝ : Invertible (submatrix A ↑e₁ ↑e₂)
⊢ ⅟(submatrix A ↑e₁ ↑e₂) = submatrix ⅟A ↑e₂ ↑e₁

tactic: convert(rfl : ⅟ (A.submatrix e₁ e₂) = _)
state_before: l : Type ?u.381588
m : Type u
n : Type u'
α : Type v
inst✝⁶ : Fintype n
inst✝⁵ : DecidableEq n
inst✝⁴ : CommRing α
A✝ B : Matrix n n α
inst✝³ : Fintype m
inst✝² : DecidableEq m
A : Matrix m m α
e₁ e₂ : n ≃ m
inst✝¹ : Invertible A
inst✝ : Invertible (submatrix A ↑e₁ ↑e₂)
this : Invertible (submatrix A ↑e₁ ↑e₂) := submatrixEquivInvertible A e₁ e₂
⊢ ⅟(submatrix A ↑e₁ ↑e₂) = submatrix ⅟A ↑e₂ ↑e₁
Theorem: MeasurableEmbedding.id
File: Mathlib/MeasureTheory/MeasurableSpace.lean

tactic: rwa [image_id]
state_before: α : Type u_1
β : Type ?u.379526
γ : Type ?u.379529
δ : Type ?u.379532
δ' : Type ?u.379535
ι : Sort uι
s✝ t u : Set α
mα : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
f : α → β
g : β → γ
s : Set α
hs : MeasurableSet s
⊢ MeasurableSet (_root_.id '' s)
Theorem: TopologicalSpace.countable_cover_nhdsWithin
File: Mathlib/Topology/Bases.lean

tactic: have : ∀ x : s, (↑) ⁻¹' f x ∈ 𝓝 x := fun x => preimage_coe_mem_nhds_subtype.2 (hf x x.2)
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
f : α → Set α
s : Set α
hf : ∀ (x : α), x ∈ s → f x ∈ 𝓝[s] x
⊢ ∃ t, t ⊆ s ∧ Set.Countable t ∧ s ⊆ ⋃ (x : α) (_ : x ∈ t), f x

tactic: rcases countable_cover_nhds this with ⟨t, htc, htU⟩
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
f : α → Set α
s : Set α
hf : ∀ (x : α), x ∈ s → f x ∈ 𝓝[s] x
this : ∀ (x : ↑s), Subtype.val ⁻¹' f ↑x ∈ 𝓝 x
⊢ ∃ t, t ⊆ s ∧ Set.Countable t ∧ s ⊆ ⋃ (x : α) (_ : x ∈ t), f x

tactic: refine' ⟨(↑) '' t, Subtype.coe_image_subset _ _, htc.image _, fun x hx => _⟩
state_before: case intro.intro
α : Type u
t✝ : TopologicalSpace α
inst✝ : SecondCountableTopology α
f : α → Set α
s : Set α
hf : ∀ (x : α), x ∈ s → f x ∈ 𝓝[s] x
this : ∀ (x : ↑s), Subtype.val ⁻¹' f ↑x ∈ 𝓝 x
t : Set ↑s
htc : Set.Countable t
htU : (⋃ (x : ↑s) (_ : x ∈ t), Subtype.val ⁻¹' f ↑x) = univ
⊢ ∃ t, t ⊆ s ∧ Set.Countable t ∧ s ⊆ ⋃ (x : α) (_ : x ∈ t), f x

tactic: simp only [biUnion_image, eq_univ_iff_forall, ← preimage_iUnion, mem_preimage] at htU⊢
state_before: case intro.intro
α : Type u
t✝ : TopologicalSpace α
inst✝ : SecondCountableTopology α
f : α → Set α
s : Set α
hf : ∀ (x : α), x ∈ s → f x ∈ 𝓝[s] x
this : ∀ (x : ↑s), Subtype.val ⁻¹' f ↑x ∈ 𝓝 x
t : Set ↑s
htc : Set.Countable t
htU : (⋃ (x : ↑s) (_ : x ∈ t), Subtype.val ⁻¹' f ↑x) = univ
x : α
hx : x ∈ s
⊢ x ∈ ⋃ (x : α) (_ : x ∈ Subtype.val '' t), f x

tactic: exact htU ⟨x, hx⟩
state_before: case intro.intro
α : Type u
t✝ : TopologicalSpace α
inst✝ : SecondCountableTopology α
f : α → Set α
s : Set α
hf : ∀ (x : α), x ∈ s → f x ∈ 𝓝[s] x
this : ∀ (x : ↑s), Subtype.val ⁻¹' f ↑x ∈ 𝓝 x
t : Set ↑s
htc : Set.Countable t
x : α
hx : x ∈ s
htU : ∀ (x : ↑s), ↑x ∈ ⋃ (i : ↑s) (_ : i ∈ t), f ↑i
⊢ x ∈ ⋃ (y : ↑s) (_ : y ∈ t), f ↑y
Theorem: Set.Ioc_diff_Ioo_same
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: rw [← Ioc_diff_right, diff_diff_cancel_left (singleton_subset_iff.2 <| right_mem_Ioc.2 h)]
state_before: α : Type u_1
β : Type ?u.43366
inst✝ : PartialOrder α
a b c : α
h : a < b
⊢ Ioc a b \ Ioo a b = {b}
Theorem: IntermediateField.algHom_mk_adjoin_splits'
File: Mathlib/FieldTheory/Adjoin.lean

tactic: cases' algHom_mk_adjoin_splits hK with ϕ
state_before: F : Type u_2
E : Type u_1
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
hS : adjoin F S = ⊤
hK : ∀ (x : E), x ∈ S → IsIntegral F x ∧ Splits (algebraMap F K) (minpoly F x)
⊢ Nonempty (E →ₐ[F] K)

tactic: rw [hS] at ϕ
state_before: case intro
F : Type u_2
E : Type u_1
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
hS : adjoin F S = ⊤
hK : ∀ (x : E), x ∈ S → IsIntegral F x ∧ Splits (algebraMap F K) (minpoly F x)
ϕ : { x // x ∈ adjoin F S } →ₐ[F] K
⊢ Nonempty (E →ₐ[F] K)

tactic: exact ⟨ϕ.comp topEquiv.symm.toAlgHom⟩
state_before: case intro
F : Type u_2
E : Type u_1
K : Type u_3
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Field K
inst✝¹ : Algebra F E
inst✝ : Algebra F K
S : Set E
hS : adjoin F S = ⊤
hK : ∀ (x : E), x ∈ S → IsIntegral F x ∧ Splits (algebraMap F K) (minpoly F x)
ϕ : { x // x ∈ ⊤ } →ₐ[F] K
⊢ Nonempty (E →ₐ[F] K)
Theorem: Real.zero_rpow_le_one
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: by_cases h : x = 0 <;> simp [h, zero_le_one]
state_before: x : ℝ
⊢ 0 ^ x ≤ 1
Theorem: BilinForm.apply_dualBasis_right
File: Mathlib/LinearAlgebra/BilinearForm.lean

tactic: rw [sym, apply_dualBasis_left]
state_before: R : Type ?u.1779865
M : Type ?u.1779868
inst✝¹⁹ : Semiring R
inst✝¹⁸ : AddCommMonoid M
inst✝¹⁷ : Module R M
R₁ : Type ?u.1779904
M₁ : Type ?u.1779907
inst✝¹⁶ : Ring R₁
inst✝¹⁵ : AddCommGroup M₁
inst✝¹⁴ : Module R₁ M₁
R₂ : Type ?u.1780516
M₂ : Type ?u.1780519
inst✝¹³ : CommSemiring R₂
inst✝¹² : AddCommMonoid M₂
inst✝¹¹ : Module R₂ M₂
R₃ : Type ?u.1780706
M₃ : Type ?u.1780709
inst✝¹⁰ : CommRing R₃
inst✝⁹ : AddCommGroup M₃
inst✝⁸ : Module R₃ M₃
V : Type u_2
K : Type u_1
inst✝⁷ : Field K
inst✝⁶ : AddCommGroup V
inst✝⁵ : Module K V
B✝ : BilinForm R M
B₁ : BilinForm R₁ M₁
B₂ : BilinForm R₂ M₂
M₂' : Type ?u.1782514
inst✝⁴ : AddCommMonoid M₂'
inst✝³ : Module R₂ M₂'
inst✝² : FiniteDimensional K V
ι : Type u_3
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
B : BilinForm K V
hB : Nondegenerate B
sym : IsSymm B
b : Basis ι K V
i j : ι
⊢ bilin B (↑b i) (↑(dualBasis B hB b) j) = if i = j then 1 else 0
Theorem: List.forall₂_drop_append
File: Mathlib/Data/List/Forall2.lean

tactic: have h' : Forall₂ R (drop (length l₁) l) (drop (length l₁) (l₁ ++ l₂)) :=
  forall₂_drop (length l₁) h
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.131759
δ : Type ?u.131762
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
l₁ l₂ : List β
h : Forall₂ R l (l₁ ++ l₂)
⊢ Forall₂ R (drop (length l₁) l) l₂

tactic: rwa [drop_left] at h'
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.131759
δ : Type ?u.131762
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
l₁ l₂ : List β
h : Forall₂ R l (l₁ ++ l₂)
h' : Forall₂ R (drop (length l₁) l) (drop (length l₁) (l₁ ++ l₂))
⊢ Forall₂ R (drop (length l₁) l) l₂
Theorem: holderOnWith_univ
File: Mathlib/Topology/MetricSpace/Holder.lean

tactic: simp only [HolderOnWith, HolderWith, mem_univ, true_imp_iff]
state_before: X : Type u_1
Y : Type u_2
Z : Type ?u.128203
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C r : ℝ≥0
f : X → Y
⊢ HolderOnWith C r f univ ↔ HolderWith C r f
Theorem: Multiset.filter_add_not
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [filter_add_filter, filter_eq_self.2, filter_eq_nil.2]
state_before: α : Type u_1
β : Type ?u.271148
γ : Type ?u.271151
p : α → Prop
inst✝ : DecidablePred p
s : Multiset α
⊢ filter p s + filter (fun a => ¬p a) s = s

tactic: simp only [add_zero]
state_before: α : Type u_1
β : Type ?u.271148
γ : Type ?u.271151
p : α → Prop
inst✝ : DecidablePred p
s : Multiset α
⊢ s + 0 = s

tactic: simp [Decidable.em, -Bool.not_eq_true, -not_and, not_and_or, or_comm]
state_before: α : Type u_1
β : Type ?u.271148
γ : Type ?u.271151
p : α → Prop
inst✝ : DecidablePred p
s : Multiset α
⊢ ∀ (a : α), a ∈ s → ¬(p a ∧ ¬p a)

tactic: simp only [Bool.not_eq_true, decide_eq_true_eq, Bool.eq_false_or_eq_true,
  decide_True, implies_true, Decidable.em]
state_before: α : Type u_1
β : Type ?u.271148
γ : Type ?u.271151
p : α → Prop
inst✝ : DecidablePred p
s : Multiset α
⊢ ∀ (a : α), a ∈ s → p a ∨ ¬p a
Theorem: CategoryTheory.Limits.cospanExt_hom_app_right
File: Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean

tactic: dsimp [cospanExt]
state_before: C : Type u
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
X Y Z X' Y' Z' : C
iX : X ≅ X'
iY : Y ≅ Y'
iZ : Z ≅ Z'
f : X ⟶ Z
g : Y ⟶ Z
f' : X' ⟶ Z'
g' : Y' ⟶ Z'
wf : iX.hom ≫ f' = f ≫ iZ.hom
wg : iY.hom ≫ g' = g ≫ iZ.hom
⊢ (cospanExt iX iY iZ wf wg).hom.app WalkingCospan.right = iY.hom
Theorem: Nat.preimage_Ioc
File: Mathlib/Algebra/Order/Floor.lean

tactic: ext
state_before: F : Type ?u.65750
α : Type u_1
β : Type ?u.65756
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
ha : 0 ≤ a
hb : 0 ≤ b
⊢ Nat.cast ⁻¹' Ioc a b = Ioc ⌊a⌋₊ ⌊b⌋₊

tactic: simp [floor_lt, le_floor_iff, hb, ha]
state_before: case h
F : Type ?u.65750
α : Type u_1
β : Type ?u.65756
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a✝ : α
n : ℕ
a b : α
ha : 0 ≤ a
hb : 0 ≤ b
x✝ : ℕ
⊢ x✝ ∈ Nat.cast ⁻¹' Ioc a b ↔ x✝ ∈ Ioc ⌊a⌋₊ ⌊b⌋₊
Theorem: Nat.ascFactorial_lt_pow_add
File: Mathlib/Data/Nat/Factorial/Basic.lean

tactic: rintro ⟨⟩
state_before: n : ℕ
⊢ 2 ≤ 0 → ascFactorial n 0 < (n + 0) ^ 0

tactic: intro
state_before: n : ℕ
⊢ 2 ≤ 1 → ascFactorial n 1 < (n + 1) ^ 1

tactic: contradiction
state_before: n : ℕ
a✝ : 2 ≤ 1
⊢ ascFactorial n 1 < (n + 1) ^ 1

tactic: rw [ascFactorial_succ, pow_succ]
state_before: n k : ℕ
x✝ : 2 ≤ k + 2
⊢ ascFactorial n (k + 2) < (n + (k + 2)) ^ (k + 2)

tactic: rw [add_assoc n (k + 1) 1, mul_comm <| (n + (k + 2)) ^ (k + 1)]
state_before: n k : ℕ
x✝ : 2 ≤ k + 2
⊢ (n + (k + 1) + 1) * ascFactorial n (k + 1) < (n + (k + 2)) ^ (k + 1) * (n + (k + 2))

tactic: refine'
  Nat.mul_lt_mul' le_rfl
    ((ascFactorial_le_pow_add n _).trans_lt
      (pow_lt_pow_of_lt_left (lt_add_one _) (succ_pos _)))
    (succ_pos _)
state_before: n k : ℕ
x✝ : 2 ≤ k + 2
⊢ (n + (k + 1 + 1)) * ascFactorial n (k + 1) < (n + (k + 2)) * (n + (k + 2)) ^ (k + 1)
Theorem: HasSum.mul_right
File: Mathlib/Topology/Algebra/InfiniteSum/Ring.lean

tactic: simpa only using hf.map (AddMonoidHom.mulRight a₂) (continuous_id.mul continuous_const)
state_before: ι : Type u_2
κ : Type ?u.1491
R : Type ?u.1494
α : Type u_1
inst✝² : NonUnitalNonAssocSemiring α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSemiring α
f g : ι → α
a a₁ a₂✝ a₂ : α
hf : HasSum f a₁
⊢ HasSum (fun i => f i * a₂) (a₁ * a₂)
Theorem: Set.Iic_union_Icc'
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: ext1 x
state_before: α : Type u_1
β : Type ?u.108702
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
⊢ Iic b ∪ Icc c d = Iic (max b d)

tactic: simp_rw [mem_union, mem_Iic, mem_Icc, le_max_iff]
state_before: case h
α : Type u_1
β : Type ?u.108702
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
x : α
⊢ x ∈ Iic b ∪ Icc c d ↔ x ∈ Iic (max b d)

tactic: by_cases hc : c ≤ x
state_before: case h
α : Type u_1
β : Type ?u.108702
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
x : α
⊢ x ≤ b ∨ c ≤ x ∧ x ≤ d ↔ x ≤ b ∨ x ≤ d

tactic: simp only [hc, true_and]
state_before: case pos
α : Type u_1
β : Type ?u.108702
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
x : α
hc : c ≤ x
⊢ x ≤ b ∨ c ≤ x ∧ x ≤ d ↔ x ≤ b ∨ x ≤ d

tactic: have hxb : x ≤ b := (le_of_not_ge hc).trans h₁
state_before: case neg
α : Type u_1
β : Type ?u.108702
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
x : α
hc : ¬c ≤ x
⊢ x ≤ b ∨ c ≤ x ∧ x ≤ d ↔ x ≤ b ∨ x ≤ d

tactic: simp only [hxb, true_or]
state_before: case neg
α : Type u_1
β : Type ?u.108702
inst✝ : LinearOrder α
a a₁ a₂ b b₁ b₂ c d : α
h₁ : c ≤ b
x : α
hc : ¬c ≤ x
hxb : x ≤ b
⊢ x ≤ b ∨ c ≤ x ∧ x ≤ d ↔ x ≤ b ∨ x ≤ d
Theorem: CategoryTheory.Splitting.ι_retraction
File: Mathlib/Algebra/Homology/ShortExact/Preadditive.lean

tactic: simp [retraction]
state_before: 𝒜 : Type u_2
inst✝² : Category 𝒜
A B C A' B' C' : 𝒜
f : A ⟶ B
g : B ⟶ C
f' : A' ⟶ B'
g' : B' ⟶ C'
inst✝¹ : HasZeroMorphisms 𝒜
inst✝ : HasBinaryBiproducts 𝒜
h : Splitting f g
⊢ f ≫ retraction h = 𝟙 A
Theorem: EMetric.hausdorffEdist_triangle
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: rw [hausdorffEdist_def]
state_before: ι : Sort ?u.46441
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ hausdorffEdist s u ≤ hausdorffEdist s t + hausdorffEdist t u

tactic: simp only [sup_le_iff, iSup_le_iff]
state_before: ι : Sort ?u.46441
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ ((⨆ (x : α) (_ : x ∈ s), infEdist x u) ⊔ ⨆ (y : α) (_ : y ∈ u), infEdist y s) ≤
    hausdorffEdist s t + hausdorffEdist t u

tactic: constructor
state_before: ι : Sort ?u.46441
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ (∀ (i : α), i ∈ s → infEdist i u ≤ hausdorffEdist s t + hausdorffEdist t u) ∧
    ∀ (i : α), i ∈ u → infEdist i s ≤ hausdorffEdist s t + hausdorffEdist t u

tactic: show ∀ x ∈ s, infEdist x u ≤ hausdorffEdist s t + hausdorffEdist t u
state_before: case left
ι : Sort ?u.46441
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ ∀ (i : α), i ∈ s → infEdist i u ≤ hausdorffEdist s t + hausdorffEdist t u

tactic: exact fun x xs =>
  calc
    infEdist x u ≤ infEdist x t + hausdorffEdist t u :=
      infEdist_le_infEdist_add_hausdorffEdist
    _ ≤ hausdorffEdist s t + hausdorffEdist t u :=
      add_le_add_right (infEdist_le_hausdorffEdist_of_mem xs) _
state_before: case left
ι : Sort ?u.46441
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ ∀ (x : α), x ∈ s → infEdist x u ≤ hausdorffEdist s t + hausdorffEdist t u

tactic: show ∀ x ∈ u, infEdist x s ≤ hausdorffEdist s t + hausdorffEdist t u
state_before: case right
ι : Sort ?u.46441
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ ∀ (i : α), i ∈ u → infEdist i s ≤ hausdorffEdist s t + hausdorffEdist t u

tactic: exact fun x xu =>
  calc
    infEdist x s ≤ infEdist x t + hausdorffEdist t s :=
      infEdist_le_infEdist_add_hausdorffEdist
    _ ≤ hausdorffEdist u t + hausdorffEdist t s :=
      add_le_add_right (infEdist_le_hausdorffEdist_of_mem xu) _
    _ = hausdorffEdist s t + hausdorffEdist t u := by simp [hausdorffEdist_comm, add_comm]
state_before: case right
ι : Sort ?u.46441
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x y : α
s t u : Set α
Φ : α → β
⊢ ∀ (x : α), x ∈ u → infEdist x s ≤ hausdorffEdist s t + hausdorffEdist t u

tactic: simp [hausdorffEdist_comm, add_comm]
state_before: ι : Sort ?u.46441
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y : α
s t u : Set α
Φ : α → β
x : α
xu : x ∈ u
⊢ hausdorffEdist u t + hausdorffEdist t s = hausdorffEdist s t + hausdorffEdist t u
Theorem: AddCommGroupCat.image.lift_fac
File: Mathlib/Algebra/Category/GroupCat/Images.lean

tactic: ext x
state_before: G H : AddCommGroupCat
f : G ⟶ H
F' : MonoFactorisation f
⊢ lift F' ≫ F'.m = ι f

tactic: change (F'.e ≫ F'.m) _ = _
state_before: case w
G H : AddCommGroupCat
f : G ⟶ H
F' : MonoFactorisation f
x : ↑(image f)
⊢ ↑(lift F' ≫ F'.m) x = ↑(ι f) x

tactic: rw [F'.fac, (Classical.indefiniteDescription _ x.2).2]
state_before: case w
G H : AddCommGroupCat
f : G ⟶ H
F' : MonoFactorisation f
x : ↑(image f)
⊢ ↑(F'.e ≫ F'.m) ↑(Classical.indefiniteDescription (fun x_1 => ↑f x_1 = ↑x) (_ : ↑x ∈ AddMonoidHom.range f)) = ↑(ι f) x

tactic: rfl
state_before: case w
G H : AddCommGroupCat
f : G ⟶ H
F' : MonoFactorisation f
x : ↑(image f)
⊢ ↑x = ↑(ι f) x
Theorem: compl_sup_distrib
File: Mathlib/Order/Heyting/Basic.lean

tactic: simp_rw [← himp_bot, sup_himp_distrib]
state_before: ι : Type ?u.154584
α : Type u_1
β : Type ?u.154590
inst✝ : HeytingAlgebra α
a✝ b✝ c a b : α
⊢ (a ⊔ b)ᶜ = aᶜ ⊓ bᶜ
Theorem: Set.card_image_of_inj_on
File: Mathlib/Data/Set/Finite.lean

tactic: simp
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
inst✝¹ : Fintype ↑s
f : α → β
inst✝ : Fintype ↑(f '' s)
H : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → f x = f y → x = y
this : (a : Prop) → Decidable a
⊢ ∀ (x : β), x ∈ Finset.image f (toFinset s) ↔ x ∈ f '' s
Theorem: SimpleGraph.Walk.reverse_cons
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: simp [reverse]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
h : Adj G u v
p : Walk G v w
⊢ reverse (cons h p) = append (reverse p) (cons (_ : Adj G v u) nil)
Theorem: Rat.cast_inv_of_ne_zero
File: Mathlib/Data/Rat/Cast.lean

tactic: have _ : (n : ℤ) ≠ 0 := fun e => by rw [e] at n0 ; exact n0 Int.cast_zero
state_before: F : Type ?u.35260
ι : Type ?u.35263
α : Type u_1
β : Type ?u.35269
inst✝ : DivisionRing α
n : ℤ
d : ℕ
h : d ≠ 0
c : Nat.coprime (Int.natAbs n) d
n0 : ↑n ≠ 0
d0 : ↑d ≠ 0
⊢ ↑(mk' n d)⁻¹ = (↑(mk' n d))⁻¹

tactic: have _ : (d : ℤ) ≠ 0 :=
  Int.coe_nat_ne_zero.2 fun e => by rw [e] at d0 ; exact d0 Nat.cast_zero
state_before: F : Type ?u.35260
ι : Type ?u.35263
α : Type u_1
β : Type ?u.35269
inst✝ : DivisionRing α
n : ℤ
d : ℕ
h : d ≠ 0
c : Nat.coprime (Int.natAbs n) d
n0 : ↑n ≠ 0
d0 : ↑d ≠ 0
x✝ : n ≠ 0
⊢ ↑(mk' n d)⁻¹ = (↑(mk' n d))⁻¹

tactic: rw [num_den', inv_def']
state_before: F : Type ?u.35260
ι : Type ?u.35263
α : Type u_1
β : Type ?u.35269
inst✝ : DivisionRing α
n : ℤ
d : ℕ
h : d ≠ 0
c : Nat.coprime (Int.natAbs n) d
n0 : ↑n ≠ 0
d0 : ↑d ≠ 0
x✝¹ : n ≠ 0
x✝ : ↑d ≠ 0
⊢ ↑(mk' n d)⁻¹ = (↑(mk' n d))⁻¹

tactic: rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, inv_div] <;> simp [n0, d0]
state_before: F : Type ?u.35260
ι : Type ?u.35263
α : Type u_1
β : Type ?u.35269
inst✝ : DivisionRing α
n : ℤ
d : ℕ
h : d ≠ 0
c : Nat.coprime (Int.natAbs n) d
n0 : ↑n ≠ 0
d0 : ↑d ≠ 0
x✝¹ : n ≠ 0
x✝ : ↑d ≠ 0
⊢ ↑(↑d /. n) = (↑(n /. ↑d))⁻¹

tactic: rw [e] at n0
state_before: F : Type ?u.35260
ι : Type ?u.35263
α : Type u_1
β : Type ?u.35269
inst✝ : DivisionRing α
n : ℤ
d : ℕ
h : d ≠ 0
c : Nat.coprime (Int.natAbs n) d
n0 : ↑n ≠ 0
d0 : ↑d ≠ 0
e : n = 0
⊢ False

tactic: exact n0 Int.cast_zero
state_before: F : Type ?u.35260
ι : Type ?u.35263
α : Type u_1
β : Type ?u.35269
inst✝ : DivisionRing α
n : ℤ
d : ℕ
h : d ≠ 0
c : Nat.coprime (Int.natAbs n) d
n0 : ↑0 ≠ 0
d0 : ↑d ≠ 0
e : n = 0
⊢ False

tactic: rw [e] at d0
state_before: F : Type ?u.35260
ι : Type ?u.35263
α : Type u_1
β : Type ?u.35269
inst✝ : DivisionRing α
n : ℤ
d : ℕ
h : d ≠ 0
c : Nat.coprime (Int.natAbs n) d
n0 : ↑n ≠ 0
d0 : ↑d ≠ 0
x✝ : n ≠ 0
e : d = 0
⊢ False

tactic: exact d0 Nat.cast_zero
state_before: F : Type ?u.35260
ι : Type ?u.35263
α : Type u_1
β : Type ?u.35269
inst✝ : DivisionRing α
n : ℤ
d : ℕ
h : d ≠ 0
c : Nat.coprime (Int.natAbs n) d
n0 : ↑n ≠ 0
d0 : ↑0 ≠ 0
x✝ : n ≠ 0
e : d = 0
⊢ False
Theorem: Associated.irreducible
File: Mathlib/Algebra/Associated.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.218014
γ : Type ?u.218017
δ : Type ?u.218020
inst✝ : Monoid α
p q : α
h : p ~ᵤ q
hp : Irreducible p
u : αˣ
hu : p * ↑u = q
a b : α
hab : q = a * b
⊢ p = p * ↑u * ↑u⁻¹

tactic: rw [hu]
state_before: α : Type u_1
β : Type ?u.218014
γ : Type ?u.218017
δ : Type ?u.218020
inst✝ : Monoid α
p q : α
h : p ~ᵤ q
hp : Irreducible p
u : αˣ
hu : p * ↑u = q
a b : α
hab : q = a * b
⊢ p * ↑u * ↑u⁻¹ = a * (b * ↑u⁻¹)

tactic: simp [hab, mul_assoc]
state_before: α : Type u_1
β : Type ?u.218014
γ : Type ?u.218017
δ : Type ?u.218020
inst✝ : Monoid α
p q : α
h : p ~ᵤ q
hp : Irreducible p
u : αˣ
hu : p * ↑u = q
a b : α
hab : q = a * b
⊢ q * ↑u⁻¹ = a * (b * ↑u⁻¹)

tactic: simp [hv]
state_before: α : Type u_1
β : Type ?u.218014
γ : Type ?u.218017
δ : Type ?u.218020
inst✝ : Monoid α
p q : α
h : p ~ᵤ q
hp : Irreducible p
u : αˣ
hu : p * ↑u = q
a b : α
hab : q = a * b
hpab : p = a * (b * ↑u⁻¹)
x✝ : IsUnit (b * ↑u⁻¹)
v : αˣ
hv : ↑v = b * ↑u⁻¹
⊢ ↑(v * u) = b
Theorem: List.range_succ
File: Std/Data/List/Lemmas.lean

tactic: simp only [range_eq_range', range'_1_concat, Nat.zero_add]
state_before: n : Nat
⊢ range (succ n) = range n ++ [n]
Theorem: Polynomial.monic_of_natDegree_le_of_coeff_eq_one
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: unfold Monic
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.648061
n : ℕ
pn : natDegree p ≤ n
p1 : coeff p n = 1
⊢ Monic p

tactic: nontriviality
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.648061
n : ℕ
pn : natDegree p ≤ n
p1 : coeff p n = 1
⊢ leadingCoeff p = 1

tactic: refine' (congr_arg _ <| natDegree_eq_of_le_of_coeff_ne_zero pn _).trans p1
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.648061
n : ℕ
pn : natDegree p ≤ n
p1 : coeff p n = 1
✝ : Nontrivial R
⊢ leadingCoeff p = 1

tactic: exact ne_of_eq_of_ne p1 one_ne_zero
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.648061
n : ℕ
pn : natDegree p ≤ n
p1 : coeff p n = 1
✝ : Nontrivial R
⊢ coeff p n ≠ 0
Theorem: Even.pow_abs
File: Mathlib/Algebra/Parity.lean

tactic: rw [← abs_pow, abs_eq_self]
state_before: F : Type ?u.112908
α : Type ?u.112911
β : Type ?u.112914
R : Type u_1
inst✝ : LinearOrderedRing R
a✝ : R
n p : ℕ
hp : Even p
a : R
⊢ abs a ^ p = a ^ p

tactic: exact hp.pow_nonneg _
state_before: F : Type ?u.112908
α : Type ?u.112911
β : Type ?u.112914
R : Type u_1
inst✝ : LinearOrderedRing R
a✝ : R
n p : ℕ
hp : Even p
a : R
⊢ 0 ≤ a ^ p
Theorem: SemiconjBy.conj_mk
File: Mathlib/Algebra/Group/Semiconj.lean

tactic: unfold SemiconjBy
state_before: G : Type u_1
inst✝ : Group G
a✝ x✝ y a x : G
⊢ SemiconjBy a x (a * x * a⁻¹)

tactic: rw [mul_assoc, inv_mul_self, mul_one]
state_before: G : Type u_1
inst✝ : Group G
a✝ x✝ y a x : G
⊢ a * x = a * x * a⁻¹ * a
Theorem: pow_one
File: Mathlib/Algebra/GroupPower/Basic.lean

tactic: rw [pow_succ, pow_zero, mul_one]
state_before: α : Type ?u.11493
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝¹ : Monoid M
inst✝ : AddMonoid A
a : M
⊢ a ^ 1 = a
Theorem: Function.Surjective.image_surjective
File: Mathlib/Data/Set/Image.lean

tactic: intro s
state_before: ι : Sort ?u.104386
α : Type u_1
β : Type u_2
f : α → β
hf : Surjective f
⊢ Surjective (image f)

tactic: use f ⁻¹' s
state_before: ι : Sort ?u.104386
α : Type u_1
β : Type u_2
f : α → β
hf : Surjective f
s : Set β
⊢ ∃ a, f '' a = s

tactic: rw [hf.image_preimage]
state_before: ι : Sort ?u.104386
α : Type u_1
β : Type u_2
f : α → β
hf : Surjective f
s : Set β
⊢ f '' (f ⁻¹' s) = s
Theorem: PadicInt.norm_lt_one_iff_dvd
File: Mathlib/NumberTheory/Padics/PadicIntegers.lean

tactic: have := norm_le_pow_iff_mem_span_pow x 1
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x : ℤ_[p]
⊢ ‖x‖ < 1 ↔ ↑p ∣ x

tactic: rw [Ideal.mem_span_singleton, pow_one] at this
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x : ℤ_[p]
this : ‖x‖ ≤ ↑p ^ (-↑1) ↔ x ∈ Ideal.span {↑p ^ 1}
⊢ ‖x‖ < 1 ↔ ↑p ∣ x

tactic: rw [← this, norm_le_pow_iff_norm_lt_pow_add_one]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x : ℤ_[p]
this : ‖x‖ ≤ ↑p ^ (-↑1) ↔ ↑p ∣ x
⊢ ‖x‖ < 1 ↔ ↑p ∣ x

tactic: simp only [zpow_zero, Int.ofNat_zero, Int.ofNat_succ, add_left_neg, zero_add]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
x : ℤ_[p]
this : ‖x‖ ≤ ↑p ^ (-↑1) ↔ ↑p ∣ x
⊢ ‖x‖ < 1 ↔ ‖x‖ < ↑p ^ (-↑1 + 1)