File: Mathlib/Data/Sigma/Lex.lean

full_name: Sigma.Lex.right
code: /-- The lexicographical order on a sigma type. It takes in a relation on the index type and a
relation for each summand. `a` is related to `b` iff their summands are related or they are in the
same summand and are related through the summand's relation. -/
inductive Lex (r : ι → ι → Prop) (s : ∀ i, α i → α i → Prop) : ∀ _ _ : Σ i, α i, Prop
  | left {i j : ι} (a : α i) (b : α j) : r i j → Lex r s ⟨i, a⟩ ⟨j, b⟩
  | right {i : ι} (a b : α i) : s i a b → Lex r s ⟨i, a⟩ ⟨i, b⟩
goal: s i a b → Sigma.Lex r s ⟨i, a⟩ ⟨i, b⟩

full_name: Sigma.Lex
code: /-- The lexicographical order on a sigma type. It takes in a relation on the index type and a
relation for each summand. `a` is related to `b` iff their summands are related or they are in the
same summand and are related through the summand's relation. -/
inductive Lex (r : ι → ι → Prop) (s : ∀ i, α i → α i → Prop) : ∀ _ _ : Σ i, α i, Prop
  | left {i j : ι} (a : α i) (b : α j) : r i j → Lex r s ⟨i, a⟩ ⟨j, b⟩
  | right {i : ι} (a b : α i) : s i a b → Lex r s ⟨i, a⟩ ⟨i, b⟩
goal: (i : ι) × α i → (i : ι) × α i → Prop

full_name: Sigma.Lex.left
code: /-- The lexicographical order on a sigma type. It takes in a relation on the index type and a
relation for each summand. `a` is related to `b` iff their summands are related or they are in the
same summand and are related through the summand's relation. -/
inductive Lex (r : ι → ι → Prop) (s : ∀ i, α i → α i → Prop) : ∀ _ _ : Σ i, α i, Prop
  | left {i j : ι} (a : α i) (b : α j) : r i j → Lex r s ⟨i, a⟩ ⟨j, b⟩
  | right {i : ι} (a b : α i) : s i a b → Lex r s ⟨i, a⟩ ⟨i, b⟩
goal: r i j → Sigma.Lex r s ⟨i, a⟩ ⟨j, b⟩

full_name: Sigma.lex_iff
code: theorem lex_iff : Lex r s a b ↔ r a.1 b.1 ∨ ∃ h : a.1 = b.1, s b.1 (h.rec a.2) b.2 
goal: Sigma.Lex r s a b ↔ r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd

full_name: Sigma.Lex.decidable
code: instance Lex.decidable (r : ι → ι → Prop) (s : ∀ i, α i → α i → Prop) [DecidableEq ι]
    [DecidableRel r] [∀ i, DecidableRel (s i)] : DecidableRel (Lex r s) 
goal: DecidableRel (Sigma.Lex r s)

full_name: Sigma.Lex.mono
code: theorem Lex.mono (hr : ∀ a b, r₁ a b → r₂ a b) (hs : ∀ i a b, s₁ i a b → s₂ i a b) {a b : Σ i, α i}
    (h : Lex r₁ s₁ a b) : Lex r₂ s₂ a b 
goal: Sigma.Lex r₂ s₂ a b

full_name: Sigma.Lex.mono_left
code: theorem Lex.mono_left (hr : ∀ a b, r₁ a b → r₂ a b) {a b : Σ i, α i} (h : Lex r₁ s a b) :
    Lex r₂ s a b 
goal: Sigma.Lex r₂ s a b

full_name: Sigma.Lex.mono_right
code: theorem Lex.mono_right (hs : ∀ i a b, s₁ i a b → s₂ i a b) {a b : Σ i, α i} (h : Lex r s₁ a b) :
    Lex r s₂ a b 
goal: Sigma.Lex r s₂ a b

full_name: Sigma.lex_swap
code: theorem lex_swap : Lex (Function.swap r) s a b ↔ Lex r (fun i => Function.swap (s i)) b a 
goal: Sigma.Lex (Function.swap r) s a b ↔ Sigma.Lex r (fun i => Function.swap (s i)) b a

full_name: Sigma.instIsReflLex
code: instance [∀ i, IsRefl (α i) (s i)] : IsRefl _ (Lex r s) 
goal: IsRefl ((i : ι) × α i) (Sigma.Lex r s)

full_name: Sigma.instIsIrreflLex
code: instance [IsIrrefl ι r] [∀ i, IsIrrefl (α i) (s i)] : IsIrrefl _ (Lex r s) 
goal: IsIrrefl ((i : ι) × α i) (Sigma.Lex r s)

full_name: Sigma.instIsTransLex
code: instance [IsTrans ι r] [∀ i, IsTrans (α i) (s i)] : IsTrans _ (Lex r s) 
goal: IsTrans ((i : ι) × α i) (Sigma.Lex r s)

full_name: Sigma.instIsSymmLex
code: instance [IsSymm ι r] [∀ i, IsSymm (α i) (s i)] : IsSymm _ (Lex r s) 
goal: IsSymm ((i : ι) × α i) (Sigma.Lex r s)

full_name: Sigma.instIsAntisymmLexOfIsAsymm
code: instance [IsAsymm ι r] [∀ i, IsAntisymm (α i) (s i)] : IsAntisymm _ (Lex r s) 
goal: IsAntisymm ((i : ι) × α i) (Sigma.Lex r s)

full_name: Sigma.instIsTotalLexOfIsTrichotomous
code: instance [IsTrichotomous ι r] [∀ i, IsTotal (α i) (s i)] : IsTotal _ (Lex r s) 
goal: IsTotal ((i : ι) × α i) (Sigma.Lex r s)

full_name: Sigma.instIsTrichotomousLex
code: instance [IsTrichotomous ι r] [∀ i, IsTrichotomous (α i) (s i)] : IsTrichotomous _ (Lex r s) 
goal: IsTrichotomous ((i : ι) × α i) (Sigma.Lex r s)

full_name: PSigma.lex_iff
code: theorem lex_iff {a b : Σ' i, α i} :
    Lex r s a b ↔ r a.1 b.1 ∨ ∃ h : a.1 = b.1, s b.1 (h.rec a.2) b.2 
goal: PSigma.Lex r s a b ↔ r a.fst b.fst ∨ ∃ h, s b.fst (h ▸ a.snd) b.snd

full_name: PSigma.Lex.decidable
code: instance Lex.decidable (r : ι → ι → Prop) (s : ∀ i, α i → α i → Prop) [DecidableEq ι]
    [DecidableRel r] [∀ i, DecidableRel (s i)] : DecidableRel (Lex r s) 
goal: DecidableRel (PSigma.Lex r s)

full_name: PSigma.Lex.mono
code: theorem Lex.mono {r₁ r₂ : ι → ι → Prop} {s₁ s₂ : ∀ i, α i → α i → Prop}
    (hr : ∀ a b, r₁ a b → r₂ a b) (hs : ∀ i a b, s₁ i a b → s₂ i a b) {a b : Σ' i, α i}
    (h : Lex r₁ s₁ a b) : Lex r₂ s₂ a b 
goal: PSigma.Lex r₂ s₂ a b

full_name: PSigma.Lex.mono_left
code: theorem Lex.mono_left {r₁ r₂ : ι → ι → Prop} {s : ∀ i, α i → α i → Prop}
    (hr : ∀ a b, r₁ a b → r₂ a b) {a b : Σ' i, α i} (h : Lex r₁ s a b) : Lex r₂ s a b 
goal: PSigma.Lex r₂ s a b

full_name: PSigma.Lex.mono_right
code: theorem Lex.mono_right {r : ι → ι → Prop} {s₁ s₂ : ∀ i, α i → α i → Prop}
    (hs : ∀ i a b, s₁ i a b → s₂ i a b) {a b : Σ' i, α i} (h : Lex r s₁ a b) : Lex r s₂ a b 
goal: PSigma.Lex r s₂ a b