Lex: rank lt card
ProvedGeneralPieces.Lex.rank_lt_cardalgorithmsanthropic-eth-16a5ce4complexity-theory
The number of an element of the list is below the length of the list.
Preamble
/- Copyright (c) 2026 Anthropic, PBC. All rights reserved.
Released under Apache 2.0; SPDX-License-Identifier: Apache-2.0.
Source and original notices: https://github.com/anthropics/formal-math/blob/16a5ce41304fcdaea4e0be7c132e1c361dc26da5/eth/NOTICE -/
import Definitions.Def_GeneralPieces_Ring_Basic
import Definitions.Def_GeneralPieces_Ring_Bridge
import Mathlib.Combinatorics.Colex
import Mathlib.Data.List.Lex
import Definitions.Def_GeneralPieces_Ring_Lex
set_option autoImplicit false
section
section
open GeneralPieces GeneralPieces.Lex
open AppHalfPieces Finset
variable {α β : Type} [LinearOrder β] [DecidableRel fun a b : β => a < b] (S : Finset α) (f : α → β)Formal statement
theorem GeneralPieces.Lex.rank_lt_card {a : α} (ha : a ∈ S) : #{c ∈ S | f c < f a} < #S := by sorrySource