File: Mathlib/Logic/Function/Conjugate.lean

full_name: Function.Semiconj
code: /--
We say that `f : α → β` semiconjugates `ga : α → α` to `gb : β → β` if `f ∘ ga = gb ∘ f`.
We use `∀ x, f (ga x) = gb (f x)` as the definition, so given `h : Function.Semiconj f ga gb` and
`a : α`, we have `h a : f (ga a) = gb (f a)` and `h.comp_eq : f ∘ ga = gb ∘ f`.
-/
def Semiconj (f : α → β) (ga : α → α) (gb : β → β) : Prop 
goal: Prop

full_name: Function.semiconj_iff_comp_eq
code: /-- Definition of `Function.Semiconj` in terms of functional equality. -/
lemma _root_.Function.semiconj_iff_comp_eq : Semiconj f ga gb ↔ f ∘ ga = gb ∘ f 
goal: Function.Semiconj f ga gb ↔ f ∘ ga = gb ∘ f

full_name: Function.Semiconj.eq
code: protected theorem eq (h : Semiconj f ga gb) (x : α) : f (ga x) = gb (f x) 
goal: f (ga x) = gb (f x)

full_name: Function.Semiconj.comp_right
code: /-- If `f` semiconjugates `ga` to `gb` and `ga'` to `gb'`,
then it semiconjugates `ga ∘ ga'` to `gb ∘ gb'`. -/
theorem comp_right (h : Semiconj f ga gb) (h' : Semiconj f ga' gb') :
    Semiconj f (ga ∘ ga') (gb ∘ gb') 
goal: Function.Semiconj f (ga ∘ ga') (gb ∘ gb')

full_name: Function.Semiconj.trans
code: /-- If `fab : α → β` semiconjugates `ga` to `gb` and `fbc : β → γ` semiconjugates `gb` to `gc`,
then `fbc ∘ fab` semiconjugates `ga` to `gc`.

See also `Function.Semiconj.comp_left` for a version with reversed arguments. -/
protected theorem trans (hab : Semiconj fab ga gb) (hbc : Semiconj fbc gb gc) :
    Semiconj (fbc ∘ fab) ga gc 
goal: Function.Semiconj (fbc ∘ fab) ga gc

full_name: Function.Semiconj.comp_left
code: /-- If `fbc : β → γ` semiconjugates `gb` to `gc` and `fab : α → β` semiconjugates `ga` to `gb`,
then `fbc ∘ fab` semiconjugates `ga` to `gc`.

See also `Function.Semiconj.trans` for a version with reversed arguments.

**Backward compatibility note:** before 2024-01-13,
this lemma used to have the same order of arguments that `Function.Semiconj.trans` has now. -/
theorem comp_left (hbc : Semiconj fbc gb gc) (hab : Semiconj fab ga gb) :
    Semiconj (fbc ∘ fab) ga gc 
goal: Function.Semiconj (fbc ∘ fab) ga gc

full_name: Function.Semiconj.id_right
code: /-- Any function semiconjugates the identity function to the identity function. -/
theorem id_right : Semiconj f id id 
goal: Function.Semiconj f id id

full_name: Function.Semiconj.id_left
code: /-- The identity function semiconjugates any function to itself. -/
theorem id_left : Semiconj id ga ga 
goal: Function.Semiconj id ga ga

full_name: Function.Semiconj.inverses_right
code: /-- If `f : α → β` semiconjugates `ga : α → α` to `gb : β → β`,
`ga'` is a right inverse of `ga`, and `gb'` is a left inverse of `gb`,
then `f` semiconjugates `ga'` to `gb'` as well. -/
theorem inverses_right (h : Semiconj f ga gb) (ha : RightInverse ga' ga) (hb : LeftInverse gb' gb) :
    Semiconj f ga' gb' 
goal: Function.Semiconj f ga' gb'

full_name: Function.Semiconj.inverse_left
code: /-- If `f` semiconjugates `ga` to `gb` and `f'` is both a left and a right inverse of `f`,
then `f'` semiconjugates `gb` to `ga`. -/
lemma inverse_left {f' : β → α} (h : Semiconj f ga gb)
    (hf₁ : LeftInverse f' f) (hf₂ : RightInverse f' f) : Semiconj f' gb ga 
goal: Function.Semiconj f' gb ga

full_name: Function.Semiconj.option_map
code: /-- If `f : α → β` semiconjugates `ga : α → α` to `gb : β → β`,
then `Option.map f` semiconjugates `Option.map ga` to `Option.map gb`. -/
theorem option_map {f : α → β} {ga : α → α} {gb : β → β} (h : Semiconj f ga gb) :
    Semiconj (Option.map f) (Option.map ga) (Option.map gb)
  
goal: Function.Semiconj (Option.map f) (Option.map ga) (Option.map gb)

full_name: Function.Commute
code: /--
Two maps `f g : α → α` commute if `f (g x) = g (f x)` for all `x : α`.
Given `h : Function.commute f g` and `a : α`, we have `h a : f (g a) = g (f a)` and
`h.comp_eq : f ∘ g = g ∘ f`.
-/
protected def Commute (f g : α → α) : Prop 
goal: Prop

full_name: Function.Semiconj.commute
code: /-- Reinterpret `Function.Semiconj f g g` as `Function.Commute f g`. These two predicates are
definitionally equal but have different dot-notation lemmas. -/
theorem Semiconj.commute {f g : α → α} (h : Semiconj f g g) : Commute f g 
goal: Function.Commute f g

full_name: Function.Commute.semiconj
code: /-- Reinterpret `Function.Commute f g` as `Function.Semiconj f g g`. These two predicates are
definitionally equal but have different dot-notation lemmas. -/
theorem semiconj (h : Commute f g) : Semiconj f g g 
goal: Function.Semiconj f g g

full_name: Function.Commute.refl
code: @[refl]
theorem refl (f : α → α) : Commute f f 
goal: Function.Commute f f

full_name: Function.Commute.symm
code: @[symm]
theorem symm (h : Commute f g) : Commute g f 
goal: Function.Commute g f

full_name: Function.Commute.comp_right
code: /-- If `f` commutes with `g` and `g'`, then it commutes with `g ∘ g'`. -/
theorem comp_right (h : Commute f g) (h' : Commute f g') : Commute f (g ∘ g') 
goal: Function.Commute f (g ∘ g')

full_name: Function.Commute.comp_left
code: /-- If `f` and `f'` commute with `g`, then `f ∘ f'` commutes with `g` as well. -/
nonrec theorem comp_left (h : Commute f g) (h' : Commute f' g) : Commute (f ∘ f') g 
goal: Function.Commute (f ∘ f') g

full_name: Function.Commute.id_right
code: /-- Any self-map commutes with the identity map. -/
theorem id_right : Commute f id 
goal: Function.Commute f id

full_name: Function.Commute.id_left
code: /-- The identity map commutes with any self-map. -/
theorem id_left : Commute id f 
goal: Function.Commute id f

full_name: Function.Commute.option_map
code: /-- If `f` commutes with `g`, then `Option.map f` commutes with `Option.map g`. -/
nonrec theorem option_map {f g : α → α} (h : Commute f g) : Commute (Option.map f) (Option.map g) 
goal: Function.Commute (Option.map f) (Option.map g)

full_name: Function.Semiconj₂
code: /--
A map `f` semiconjugates a binary operation `ga` to a binary operation `gb` if
for all `x`, `y` we have `f (ga x y) = gb (f x) (f y)`. E.g., a `MonoidHom`
semiconjugates `(*)` to `(*)`.
-/
def Semiconj₂ (f : α → β) (ga : α → α → α) (gb : β → β → β) : Prop 
goal: Prop

full_name: Function.Semiconj₂.eq
code: protected theorem eq (h : Semiconj₂ f ga gb) (x y : α) : f (ga x y) = gb (f x) (f y) 
goal: f (ga x y) = gb (f x) (f y)

full_name: Function.Semiconj₂.comp_eq
code: protected theorem comp_eq (h : Semiconj₂ f ga gb) : bicompr f ga = bicompl gb f f 
goal: Function.bicompr f ga = Function.bicompl gb f f

full_name: Function.Semiconj₂.id_left
code: theorem id_left (op : α → α → α) : Semiconj₂ id op op 
goal: Function.Semiconj₂ id op op

full_name: Function.Semiconj₂.comp
code: theorem comp {f' : β → γ} {gc : γ → γ → γ} (hf' : Semiconj₂ f' gb gc) (hf : Semiconj₂ f ga gb) :
    Semiconj₂ (f' ∘ f) ga gc 
goal: Function.Semiconj₂ (f' ∘ f) ga gc

full_name: Function.Semiconj₂.isAssociative_right
code: theorem isAssociative_right [Std.Associative ga] (h : Semiconj₂ f ga gb) (h_surj : Surjective f) :
    Std.Associative gb 
goal: Std.Associative gb

full_name: Function.Semiconj₂.isAssociative_left
code: theorem isAssociative_left [Std.Associative gb] (h : Semiconj₂ f ga gb) (h_inj : Injective f) :
    Std.Associative ga 
goal: Std.Associative ga

full_name: Function.Semiconj₂.isIdempotent_right
code: theorem isIdempotent_right [Std.IdempotentOp ga] (h : Semiconj₂ f ga gb) (h_surj : Surjective f) :
    Std.IdempotentOp gb 
goal: Std.IdempotentOp gb

full_name: Function.Semiconj₂.isIdempotent_left
code: theorem isIdempotent_left [Std.IdempotentOp gb] (h : Semiconj₂ f ga gb) (h_inj : Injective f) :
    Std.IdempotentOp ga 
goal: Std.IdempotentOp ga