File: Mathlib/Order/PiLex.lean

full_name: Pi.Lex
code: /-- The lexicographic relation on `Π i : ι, β i`, where `ι` is ordered by `r`,
  and each `β i` is ordered by `s`. -/
protected def Lex (x y : ∀ i, β i) : Prop 
goal: Prop

full_name: Pi.«_aux_Mathlib_Order_PiLex___macroRules_Pi_termΠₗ_,__1»
code: /-- The notation `Πₗ i, α i` refers to a pi type equipped with the lexicographic order. -/
notation3 (prettyPrint := false) "Πₗ "(...)", "r:(scoped p => Lex (∀ i, p i)) => r
goal: Lean.Macro

full_name: Pi.toLex_apply
code: @[simp]
theorem toLex_apply (x : ∀ i, β i) (i : ι) : toLex x i = x i 
goal: toLex x i = x i

full_name: Pi.ofLex_apply
code: @[simp]
theorem ofLex_apply (x : Lex (∀ i, β i)) (i : ι) : ofLex x i = x i 
goal: ofLex x i = x i

full_name: Pi.lex_lt_of_lt_of_preorder
code: theorem lex_lt_of_lt_of_preorder [∀ i, Preorder (β i)] {r} (hwf : WellFounded r) {x y : ∀ i, β i}
    (hlt : x < y) : ∃ i, (∀ j, r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i 
goal: ∃ i, (∀ (j : ι), r j i → x j ≤ y j ∧ y j ≤ x j) ∧ x i < y i

full_name: Pi.lex_lt_of_lt
code: theorem lex_lt_of_lt [∀ i, PartialOrder (β i)] {r} (hwf : WellFounded r) {x y : ∀ i, β i}
    (hlt : x < y) : Pi.Lex r (@fun i => (· < ·)) x y 
goal: Pi.Lex r (fun i x x_1 => x < x_1) x y

full_name: Pi.isTrichotomous_lex
code: theorem isTrichotomous_lex [∀ i, IsTrichotomous (β i) s] (wf : WellFounded r) :
    IsTrichotomous (∀ i, β i) (Pi.Lex r @s) 
goal: IsTrichotomous ((i : ι) → β i) (Pi.Lex r s)

full_name: Pi.instLTLexForall
code: instance [LT ι] [∀ a, LT (β a)] : LT (Lex (∀ i, β i)) 
goal: LT (Lex ((i : ι) → β i))

full_name: Pi.Lex.isStrictOrder
code: instance Lex.isStrictOrder [LinearOrder ι] [∀ a, PartialOrder (β a)] :
    IsStrictOrder (Lex (∀ i, β i)) (· < ·) 
goal: IsStrictOrder (Lex ((i : ι) → β i)) fun x x_1 => x < x_1

full_name: Pi.instPartialOrderLexForallOfLinearOrder
code: instance [LinearOrder ι] [∀ a, PartialOrder (β a)] : PartialOrder (Lex (∀ i, β i)) 
goal: PartialOrder (Lex ((i : ι) → β i))

full_name: Pi.instLinearOrderLexForallOfIsWellOrderLt
code: /-- `Πₗ i, α i` is a linear order if the original order is well-founded. -/
noncomputable instance [LinearOrder ι] [IsWellOrder ι (· < ·)] [∀ a, LinearOrder (β a)] :
    LinearOrder (Lex (∀ i, β i)) 
goal: LinearOrder (Lex ((i : ι) → β i))

full_name: Pi.toLex_monotone
code: theorem toLex_monotone : Monotone (@toLex (∀ i, β i)) 
goal: Monotone ⇑toLex

full_name: Pi.toLex_strictMono
code: theorem toLex_strictMono : StrictMono (@toLex (∀ i, β i)) 
goal: StrictMono ⇑toLex

full_name: Pi.lt_toLex_update_self_iff
code: @[simp]
theorem lt_toLex_update_self_iff : toLex x < toLex (update x i a) ↔ x i < a 
goal: toLex x < toLex (Function.update x i a) ↔ x i < a

full_name: Pi.toLex_update_lt_self_iff
code: @[simp]
theorem toLex_update_lt_self_iff : toLex (update x i a) < toLex x ↔ a < x i 
goal: toLex (Function.update x i a) < toLex x ↔ a < x i

full_name: Pi.le_toLex_update_self_iff
code: @[simp]
theorem le_toLex_update_self_iff : toLex x ≤ toLex (update x i a) ↔ x i ≤ a 
goal: toLex x ≤ toLex (Function.update x i a) ↔ x i ≤ a

full_name: Pi.toLex_update_le_self_iff
code: @[simp]
theorem toLex_update_le_self_iff : toLex (update x i a) ≤ toLex x ↔ a ≤ x i 
goal: toLex (Function.update x i a) ≤ toLex x ↔ a ≤ x i

full_name: Pi.instOrderBotLexForallOfIsWellOrderLt
code: instance [LinearOrder ι] [IsWellOrder ι (· < ·)] [∀ a, PartialOrder (β a)] [∀ a, OrderBot (β a)] :
    OrderBot (Lex (∀ a, β a)) 
goal: OrderBot (Lex ((a : ι) → β a))

full_name: Pi.instOrderTopLexForallOfIsWellOrderLt
code: instance [LinearOrder ι] [IsWellOrder ι (· < ·)] [∀ a, PartialOrder (β a)] [∀ a, OrderTop (β a)] :
    OrderTop (Lex (∀ a, β a)) 
goal: OrderTop (Lex ((a : ι) → β a))

full_name: Pi.instBoundedOrderLexForallOfIsWellOrderLt
code: instance [LinearOrder ι] [IsWellOrder ι (· < ·)] [∀ a, PartialOrder (β a)]
    [∀ a, BoundedOrder (β a)] : BoundedOrder (Lex (∀ a, β a)) 
goal: BoundedOrder (Lex ((a : ι) → β a))

full_name: Pi.instDenselyOrderedLexForall
code: instance [Preorder ι] [∀ i, LT (β i)] [∀ i, DenselyOrdered (β i)] :
    DenselyOrdered (Lex (∀ i, β i)) 
goal: DenselyOrdered (Lex ((i : ι) → β i))

full_name: Pi.Lex.noMaxOrder'
code: theorem Lex.noMaxOrder' [Preorder ι] [∀ i, LT (β i)] (i : ι) [NoMaxOrder (β i)] :
    NoMaxOrder (Lex (∀ i, β i)) 
goal: NoMaxOrder (Lex ((i : ι) → β i))

full_name: Pi.instNoMaxOrderLexForallOfIsWellOrderLtOfNonempty
code: instance [LinearOrder ι] [IsWellOrder ι (· < ·)] [Nonempty ι] [∀ i, PartialOrder (β i)]
    [∀ i, NoMaxOrder (β i)] : NoMaxOrder (Lex (∀ i, β i)) 
goal: NoMaxOrder (Lex ((i : ι) → β i))

full_name: Pi.instNoMinOrderLexForallOfIsWellOrderLtOfNonempty
code: instance [LinearOrder ι] [IsWellOrder ι (· < ·)] [Nonempty ι] [∀ i, PartialOrder (β i)]
    [∀ i, NoMinOrder (β i)] : NoMinOrder (Lex (∀ i, β i)) 
goal: NoMinOrder (Lex ((i : ι) → β i))

full_name: Pi.lex_desc
code: /-- If we swap two strictly decreasing values in a function, then the result is lexicographically
smaller than the original function. -/
theorem lex_desc {α} [Preorder ι] [DecidableEq ι] [Preorder α] {f : ι → α} {i j : ι} (h₁ : i ≤ j)
    (h₂ : f j < f i) : toLex (f ∘ Equiv.swap i j) < toLex f 
goal: toLex (f ∘ ⇑(Equiv.swap i j)) < toLex f