While this submission is a draft, it cannot be used by other submissions.

The values of the world counts

Lax794877.WorldsValues · concepts/Lax794877/WorldsValues.lean · lax-794877

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Lemma

    The number of possible worlds of an instance in which a sentence holds, and the number of weighted witnesses of the worlds in which it holds, are invariant under isomorphism of instances, so they are the values of the two counting problems.

    Concept map
    23 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    This concept declares 4 statements. Each proof establishes one of them relative to its assumptions.

    1 possibleWorlds_count_iso proven

    3 weightedWorlds_count_iso proven

    Lean source view on GitHub

    1import Lax366625.CountingClasses
    2import Lax366625.CountingProblems
    3import Lax366625.QuantitativeLogic
    4import Lax366625.WitnessCounting
    5import Lax799700.Common
    6import Lax859101.OneCallReductions
    7import Lax904597.Machines
    8import Lax904597.SecondOrder
    9import Mathlib.Algebra.BigOperators.Field
    10import Mathlib.Algebra.BigOperators.Fin
    11import Mathlib.Algebra.BigOperators.Finprod
    12import Mathlib.Algebra.BigOperators.Group.Finset.Basic
    13import Mathlib.Algebra.BigOperators.Pi
    14import Mathlib.Algebra.BigOperators.Ring.Finset
    15import Mathlib.Algebra.Group.Action.Defs
    16import Mathlib.Algebra.Order.BigOperators.Group.Finset
    17import Mathlib.Algebra.Order.BigOperators.Ring.Finset
    18import Mathlib.Algebra.Order.Field.Basic
    19import Mathlib.Algebra.Order.Ring.Rat
    20import Mathlib.Data.Finite.Sigma
    21import Mathlib.Data.Finset.Max
    22import Mathlib.Data.Fintype.BigOperators
    23import Mathlib.Data.Fintype.Card
    24import Mathlib.Data.Fintype.EquivFin
    25import Mathlib.Data.Fintype.Lattice
    26import Mathlib.Data.Fintype.Pi
    27import Mathlib.Data.Fintype.Pigeonhole
    28import Mathlib.Data.Fintype.Sort
    29import Mathlib.Data.Nat.Bitwise
    30import Mathlib.Data.Prod.Lex
    31import Mathlib.Data.Set.Card
    32import Mathlib.Data.Set.Finite.Lemmas
    33import Mathlib.Dynamics.FixedPoints.Basic
    34import Mathlib.Logic.Equiv.Fin.Basic
    35import Mathlib.Logic.Equiv.Prod
    36import Mathlib.ModelTheory.Complexity
    37import Mathlib.ModelTheory.Graph
    38import Mathlib.ModelTheory.Order
    39import Mathlib.ModelTheory.Semantics
    40import Mathlib.ModelTheory.Syntax
    41import Mathlib.Order.Hom.Set
    42import Mathlib.Order.Lattice.Nat
    43import Mathlib.Order.PiLex
    44import Mathlib.SetTheory.Cardinal.Finite
    45import Mathlib.Tactic.FieldSimp
    46import Mathlib.Tactic.FinCases
    47import Mathlib.Tactic.Linarith
    48import Mathlib.Tactic.Ring
    49import Lax794877.PossibleWorlds
    50import Lax794877.WeightedWorlds
    51import Lax794877.Queries
    52import Lax794877.ExampleDatabase
    53
    54/-!
    55---
    56title: The values of the world counts
    57type: lemma
    58---
    59The number of possible worlds of an instance in which a sentence holds, and
    60the number of weighted witnesses of the worlds in which it holds, are
    61invariant under isomorphism of instances, so they are the values of the two
    62counting problems.
    63-/
    64
    65namespace Lax794877.WorldsValues
    66
    67open Lax904597.SecondOrder
    68open FirstOrder
    69open Language Structure
    70open Lax794877.PossibleWorlds Lax799700.Common Lax904597.SecondOrder
    71open FirstOrder.Language
    72open Lax366625.CountingProblems Lax366625.CountingClasses Lax366625.WitnessCounting
    73 Lax366625.QuantitativeLogic
    74open Lax859101.OneCallReductions Lax904597.Machines
    75open Lax794877.PossibleWorlds Lax794877.WeightedWorlds Lax794877.Queries Lax794877.ExampleDatabase
    76
    77/-- The number of possible worlds satisfying a sentence is isomorphism-invariant. -/
    78axiom possibleWorlds_count_iso :
    79 ∀ {L : Language.{0, 0}} [Finite (Σ n, L.Relations n)] [L.IsRelational] (φ : L.Sentence)
    80 {A B : Type}
    81 [(L.sum L).Structure A] [(L.sum L).Structure B], (A ≃[L.sum L] B) →
    82 Nat.card {ρ : (worldBlock L).Assignment A // IsWorld ρ ∧ @Sentence.Realize L A
    83 (worldStructure ρ) φ} =
    84 Nat.card {ρ : (worldBlock L).Assignment B // IsWorld ρ ∧ @Sentence.Realize L B
    85 (worldStructure ρ) φ}
    86
    87/-- The value of counting possible worlds is the number it counts. -/
    88axiom possibleWorlds_eq :
    89 ∀ {L : Language.{0, 0}} [Finite (Σ n, L.Relations n)] [L.IsRelational] (φ : L.Sentence)
    90 (A : Type) [(L.sum L).Structure A],
    91 PossibleWorlds φ A = Nat.card {ρ :
    92 (worldBlock L).Assignment A // IsWorld ρ ∧ @Sentence.Realize L A (worldStructure ρ) φ}
    93
    94/-- The number of weighted witnesses is isomorphism-invariant. -/
    95axiom weightedWorlds_count_iso :
    96 ∀ {L : Language.{0, 0}} [Finite (Σ n, L.Relations n)] [L.IsRelational] (φ : L.Sentence)
    97 {A B : Type}
    98 [(weightedLang L).Structure A] [(weightedLang L).Structure B], (A ≃[weightedLang L] B) →
    99 Nat.card {σ : (weightBlock L).Assignment A // IsLinOrd (WLe L A) ∧
    100 (∀ (p : Σ n, L.Relations n) (x : Fin p.1 → A), WeightCond σ p x) ∧
    101 @Sentence.Realize L A (worldStructure (worldOf σ)) φ} =
    102 Nat.card {σ : (weightBlock L).Assignment B // IsLinOrd (WLe L B) ∧
    103 (∀ (p : Σ n, L.Relations n) (x : Fin p.1 → B), WeightCond σ p x) ∧
    104 @Sentence.Realize L B (worldStructure (worldOf σ)) φ}
    105
    106/-- The value of counting weighted possible worlds is the number it counts. -/
    107axiom weightedWorlds_eq :
    108 ∀ {L : Language.{0, 0}} [Finite (Σ n, L.Relations n)] [L.IsRelational] (φ : L.Sentence)
    109 (A : Type) [(weightedLang L).Structure A],
    110 WeightedWorlds φ A = Nat.card {σ : (weightBlock L).Assignment A // IsLinOrd (WLe L A) ∧
    111 (∀ (p : Σ n, L.Relations n) (x : Fin p.1 → A), WeightCond σ p x) ∧
    112 @Sentence.Realize L A (worldStructure (worldOf σ)) φ}
    113
    114end Lax794877.WorldsValues
    115
    Show ProofShow ProofShow ProofShow Proof

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…