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

The probability of ∃x y, R(x) ∧ S(x, y) is easy

Lax794877.HierarchicalQueryInFP · concepts/Lax794877/HierarchicalQueryInFP.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

    Theorem

    On the same weighted instances, the numerator of the probability of the hierarchical query ∃x y, R(x)∧S(x,y)\exists x\, y,\ R(x) \wedge S(x, y) is in FP. Given which RR-facts are present, the query fails when no present R(x)R(x) has a present S(x,y)S(x, y), a condition on each SS-fact separately, so the weight of the worlds in which it fails is a product over xx, times the total weight of the TT-facts. The weight of the worlds in which it holds is computed the same way, without a subtraction, as a term of quantitative first-order logic.

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

    Each proof establishes this claim relative to its assumptions.

    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 probability of ∃x y, R(x) ∧ S(x, y) is easy
    57type: theorem
    58---
    59On the same weighted instances, the numerator of the probability of the
    60hierarchical query ∃x y, R(x)∧S(x,y)\exists x\, y,\ R(x) \wedge S(x, y) is in FP. Given
    61which RR-facts are present, the query fails when no present R(x)R(x) has a
    62present S(x,y)S(x, y), a condition on each SS-fact separately, so the weight of
    63the worlds in which it fails is a product over xx, times the total weight
    64of the TT-facts. The weight of the worlds in which it holds is computed the
    65same way, without a subtraction, as a term of quantitative first-order
    66logic.
    67-/
    68
    69namespace Lax794877.HierarchicalQueryInFP
    70
    71open Lax904597.SecondOrder
    72open FirstOrder
    73open Language Structure
    74open Lax794877.PossibleWorlds Lax799700.Common Lax904597.SecondOrder
    75open FirstOrder.Language
    76open Lax366625.CountingProblems Lax366625.CountingClasses Lax366625.WitnessCounting
    77 Lax366625.QuantitativeLogic
    78open Lax859101.OneCallReductions Lax904597.Machines
    79open Lax794877.PossibleWorlds Lax794877.WeightedWorlds Lax794877.Queries Lax794877.ExampleDatabase
    80
    81/-- The numerator of the probability of the hierarchical query is in FP. -/
    82axiom weightedWorlds_rs_mem_FP :
    83 FP.Mem (WeightedWorlds rs)
    84
    85end Lax794877.HierarchicalQueryInFP
    86
    Show Proof

    Discussion

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

    Loading discussion…