Finite intervals in a disjoint union #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file provides the locally_finite_order
instance for the disjoint sum and linear sum of two
orders and calculates the cardinality of their finite intervals.
Lifts maps α₁ → β₁ → finset γ₁
and α₂ → β₂ → finset γ₂
to a map
α₁ ⊕ α₂ → β₁ ⊕ β₂ → finset (γ₁ ⊕ γ₂)
. Could be generalized to alternative
functors if we can
make sure to keep computability and universe polymorphism.
Equations
- finset.sum_lift₂ f g (sum.inr a) (sum.inr b) = finset.map function.embedding.inr (g a b)
- finset.sum_lift₂ f g (sum.inr a) (sum.inl b) = ∅
- finset.sum_lift₂ f g (sum.inl a) (sum.inr b) = ∅
- finset.sum_lift₂ f g (sum.inl a) (sum.inl b) = finset.map function.embedding.inl (f a b)
Lifts maps α₁ → β₁ → finset γ₁
, α₂ → β₂ → finset γ₂
, α₁ → β₂ → finset γ₁
,
α₂ → β₂ → finset γ₂
to a map α₁ ⊕ α₂ → β₁ ⊕ β₂ → finset (γ₁ ⊕ γ₂)
. Could be generalized to
alternative monads if we can make sure to keep computability and universe polymorphism.
Equations
- finset.sum_lex_lift f₁ f₂ g₁ g₂ (sum.inr a) (sum.inr b) = finset.map {to_fun := sum.inr γ₂, inj' := _} (f₂ a b)
- finset.sum_lex_lift f₁ f₂ g₁ g₂ (sum.inr a) (sum.inl b) = ∅
- finset.sum_lex_lift f₁ f₂ g₁ g₂ (sum.inl a) (sum.inr b) = (g₁ a b).disj_sum (g₂ a b)
- finset.sum_lex_lift f₁ f₂ g₁ g₂ (sum.inl a) (sum.inl b) = finset.map function.embedding.inl (f₁ a b)
Disjoint sum of orders #
Equations
- sum.locally_finite_order = {finset_Icc := finset.sum_lift₂ finset.Icc finset.Icc, finset_Ico := finset.sum_lift₂ finset.Ico finset.Ico, finset_Ioc := finset.sum_lift₂ finset.Ioc finset.Ioc, finset_Ioo := finset.sum_lift₂ finset.Ioo finset.Ioo, finset_mem_Icc := _, finset_mem_Ico := _, finset_mem_Ioc := _, finset_mem_Ioo := _}
Lexicographical sum of orders #
Equations
- sum.lex.locally_finite_order = {finset_Icc := λ (a b : α ⊕ₗ β), finset.map to_lex.to_embedding (finset.sum_lex_lift finset.Icc finset.Icc (λ (a : α) (_x : β), finset.Ici a) (λ (_x : α), finset.Iic) (⇑of_lex a) (⇑of_lex b)), finset_Ico := λ (a b : α ⊕ₗ β), finset.map to_lex.to_embedding (finset.sum_lex_lift finset.Ico finset.Ico (λ (a : α) (_x : β), finset.Ici a) (λ (_x : α), finset.Iio) (⇑of_lex a) (⇑of_lex b)), finset_Ioc := λ (a b : α ⊕ₗ β), finset.map to_lex.to_embedding (finset.sum_lex_lift finset.Ioc finset.Ioc (λ (a : α) (_x : β), finset.Ioi a) (λ (_x : α), finset.Iic) (⇑of_lex a) (⇑of_lex b)), finset_Ioo := λ (a b : α ⊕ₗ β), finset.map to_lex.to_embedding (finset.sum_lex_lift finset.Ioo finset.Ioo (λ (a : α) (_x : β), finset.Ioi a) (λ (_x : α), finset.Iio) (⇑of_lex a) (⇑of_lex b)), finset_mem_Icc := _, finset_mem_Ico := _, finset_mem_Ioc := _, finset_mem_Ioo := _}