Aether Catalog definitions — Evergreen_Factor_Basic
DefinitionEvergreen_Factor_Basicaether-catalogevergreen
Definition bundle for the Aether Catalog module Evergreen.Factor.Basic, transplanted by skeleton subtraction; supplies the types and constants the catalog's theorems import.
Definition code
-- Def bundle generated from Evergreen/Factor/Basic.lean by skeleton subtraction
import Mathlib
/-
# Oracle Theory — Basic Definitions
Formalization of oracles, anti-oracles, and their fundamental properties.
An **oracle** over a type `α` is a decision procedure modeled as a set:
membership in the set means "the oracle answers yes."
The **anti-oracle** (contrarian oracle) always gives the opposite answer.
-/
namespace OracleTheory
/-- An oracle over a type `α` is a decision set: `x ∈ O.carrier` means
the oracle answers "yes" to query `x`. -/
@[ext]
structure Oracle (α : Type*) where
carrier : Set α
namespace Oracle
variable {α : Type*}
/-- The empty oracle: always answers "no". -/
def empty : Oracle α := ⟨∅⟩
/-- The universal oracle: always answers "yes". -/
def univ : Oracle α := ⟨Set.univ⟩
/-- The anti-oracle (contrarian): always gives the opposite answer. -/
def anti (O : Oracle α) : Oracle α := ⟨O.carrierᶜ⟩
/-- The join (union) of two oracles: says "yes" when either says "yes". -/
def join (O₁ O₂ : Oracle α) : Oracle α := ⟨O₁.carrier ∪ O₂.carrier⟩
/-- The meet (intersection) of two oracles: says "yes" when both say "yes". -/
def meet (O₁ O₂ : Oracle α) : Oracle α := ⟨O₁.carrier ∩ O₂.carrier⟩
/-- The symmetric difference (XOR) of two oracles. -/
def xor (O₁ O₂ : Oracle α) : Oracle α := ⟨symmDiff O₁.carrier O₂.carrier⟩
/-- The set difference of two oracles. -/
def sdiff (O₁ O₂ : Oracle α) : Oracle α := ⟨O₁.carrier \ O₂.carrier⟩
-- Simp lemmas for carrier access
-- ============================================================
-- Core Anti-Oracle Properties
-- ============================================================
-- ============================================================
-- De Morgan's Laws for Oracles
-- ============================================================
-- ============================================================
-- Join/Meet algebraic properties
-- ============================================================
-- ============================================================
-- Subset ordering on oracles
-- ============================================================
/-- Oracle O₁ is weaker than O₂ if every "yes" answer of O₁ is also a "yes" of O₂. -/
def weaker (O₁ O₂ : Oracle α) : Prop := O₁.carrier ⊆ O₂.carrier
-- ============================================================
-- Oracle Equivalence
-- ============================================================
end Oracle
end OracleTheory