Expand description
§OxiLean Standard Library — Core Data Types & Theorems
The standard library provides essential types, type classes, and theorems for OxiLean programs. It is written in OxiLean itself and loaded into the kernel environment at startup.
§Architecture Overview
The standard library is organized into logical categories:
- Primitive Types:
nat,bool,char,int,string,list,array,option,result - Type Classes:
Eq,Ord,Show,Repr,Functor,Monad,Monoid,Decidable - Core Theorems: equality, logic, arithmetic, order
- Utilities: tactic lemmas, decision procedures, parsing combinators
§Environment Building
Loading happens via build_*_env functions:
ⓘ
let env = Environment::new();
let env = build_nat_env(env)?;
let env = build_list_env(env)?;
let env = build_eq_env(env)?;See registry module for module metadata and dependency graph.
Re-exports§
pub use algebra::build_algebra_env;pub use array::build_array_env;pub use bitvec::build_bitvec_env;pub use bool::build_bool_env;pub use category_theory::build_category_theory_env;pub use char::build_char_env;pub use decidable::build_decidable_env;pub use either::build_either_env;pub use eq::build_eq_env;pub use fin::build_fin_env;pub use functor::build_functor_env;pub use group_theory::build_group_theory_env;pub use hashmap::build_hashmap_env;pub use hashset::build_hashset_env;pub use int::build_int_env;pub use io::build_io_env;pub use lazy::build_lazy_env;pub use list::build_list_env;pub use logic::build_logic_env;pub use monad::build_monad_env;pub use nat::build_nat_env;pub use option::build_option_env;pub use ord::build_ord_env;pub use order::build_order_env;pub use ordering::build_ordering_env;pub use parsec::build_parsec_env;pub use prod::build_prod_env;pub use prop::build_prop_env;pub use quotient_types::build_quotient_types_env;pub use range::build_range_env;pub use rbtree::build_rbtree_env;pub use real::build_real_env;pub use repr::build_repr_env;pub use result::build_result_env;pub use set::build_set_env;pub use show::build_show_env;pub use sigma::build_sigma_env;pub use stream::build_stream_env;pub use string::build_string_env;pub use sum::build_sum_env;pub use tactic_lemmas::build_tactic_lemmas_env;pub use thunk::build_thunk_env;pub use topology::build_topology_env;pub use vec::build_vec_env;pub use wellfounded::build_wellfounded_env;pub use registry::all_modules;pub use registry::all_theorems;pub use registry::count_default_modules;pub use registry::count_total_modules;pub use registry::default_modules;pub use registry::dependents_of;pub use registry::direct_deps;pub use registry::entries_in_module;pub use registry::find_module;pub use registry::lookup_std_entry;pub use registry::module_category;pub use registry::modules_for_phase;pub use registry::topological_sort_modules;pub use registry::BuildPhase;pub use registry::ModuleDep;pub use registry::StdCategory;pub use registry::StdEntry;pub use registry::StdFeatures;pub use registry::StdLibStats;pub use registry::StdModuleEntry;pub use registry::StdVersion;pub use registry::CORE_DEPS;pub use registry::STD_KNOWN_ENTRIES;pub use registry::STD_MODULE_REGISTRY;pub use registry::STD_VERSION;pub use std_utilities::BitSet64;pub use std_utilities::Counter;pub use std_utilities::Diagnostic;pub use std_utilities::DiagnosticBag;pub use std_utilities::DiagnosticLevel;pub use std_utilities::DirectedGraph;pub use std_utilities::FreshNameGen;pub use std_utilities::Located;pub use std_utilities::MinHeap;pub use std_utilities::MultiMap;pub use std_utilities::NameTable;pub use std_utilities::ScopeTable;pub use std_utilities::Span;pub use std_utilities::StringSet;pub use std_utilities::Trie;
Modules§
- abstract_
algebra_ adv - Auto-generated module structure
- abstract_
algebra_ advanced - Auto-generated module structure
- abstract_
interpretation - Auto-generated module structure
- abstract_
rewriting - Abstract Rewriting Systems (ARS) and term rewriting.
- algebra
- Auto-generated module structure
- algebraic_
combinatorics - Algebraic combinatorics: Young tableaux, symmetric functions, crystal graphs, Robinson-Schensted correspondence, and combinatorial sequences.
- algebraic_
effects - Auto-generated module structure
- algebraic_
geometry - Auto-generated module structure
- algebraic_
k_ theory - Algebraic K-theory: K_0, K_1, and K_2 groups for rings and fields.
- algebraic_
number_ theory - Auto-generated module structure
- algebraic_
topology - Auto-generated module structure
- analytic_
number_ theory - Auto-generated module structure
- approximation_
algorithms - Auto-generated module structure
- arithmetic_
geometry - Auto-generated module structure
- array
- Auto-generated module structure
- automata_
theory - Auto-generated module structure
- bayesian_
networks - Auto-generated module structure
- bioinformatics
- Auto-generated module structure
- birational_
geometry - Auto-generated module structure
- bitvec
- Auto-generated module structure
- bool
- Auto-generated module structure
- categorical_
logic - Auto-generated module structure
- category_
theory - Auto-generated module structure
- category_
theory_ ext - Auto-generated module structure
- certified_
algorithms - Auto-generated module structure
- chaos_
theory - Auto-generated module structure
- char
- Auto-generated module structure
- chromatic_
homotopy - Auto-generated module structure
- coalgebra_
theory - Auto-generated module structure
- coding_
theory - Auto-generated module structure
- coinduction
- Coinductive proofs and greatest fixed points.
- combinatorial_
game_ theory - Auto-generated module structure
- combinatorial_
optimization - Auto-generated module structure
- combinatorics
- Auto-generated module structure
- combinatory_
logic - Combinatory logic and SKI calculus.
- compiler_
theory - Auto-generated module structure
- complex
- Auto-generated module structure
- complexity
- Auto-generated module structure
- computability_
theory - Computability and decidability theory.
- computational_
geometry - Auto-generated module structure
- concurrency_
theory - Auto-generated module structure
- constructive_
mathematics - Auto-generated module structure
- control_
theory - Auto-generated module structure
- convex_
analysis - Convex analysis module.
- convex_
geometry - Auto-generated module structure
- convex_
optimization - Auto-generated module structure
- cryptographic_
protocols - Auto-generated module structure
- cryptography
- Auto-generated module structure
- cubical_
type_ theory - Auto-generated module structure
- data_
structures - Auto-generated module structure
- decidable
- Auto-generated module structure
- denotational_
semantics - Auto-generated module structure
- dependent_
type_ theory - Dependent type theory formalizations.
- derived_
algebraic_ geometry - Auto-generated module structure
- descriptive_
set_ theory - Auto-generated module structure
- differential_
equations - Auto-generated module structure
- differential_
geometry - Auto-generated module structure
- differential_
privacy - Auto-generated module structure
- diophantine_
geometry - Auto-generated module structure
- distributed_
systems_ theory - Auto-generated module structure
- domain_
theory - Auto-generated module structure
- either
- Auto-generated module structure
- elliptic_
curves - Auto-generated module structure
- env_
builder - Auto-generated module structure
- eq
- Auto-generated module structure
- ergodic_
theory - Auto-generated module structure
- fin
- Auto-generated module structure
- finite_
element_ method - Auto-generated module structure
- forcing_
theory - Auto-generated module structure
- formal_
argumentation - Formal Argumentation — Dung’s abstract argumentation frameworks.
- formal_
epistemology - Formal Epistemology — belief revision, epistemic logic, Kripke semantics.
- formal_
languages - Auto-generated module structure
- formal_
verification - Auto-generated module structure
- functional_
analysis - Auto-generated module structure
- functional_
calculus - Auto-generated module structure
- functional_
programming - Auto-generated module structure
- functor
- Auto-generated module structure
- fuzzy_
logic - Auto-generated module structure
- game_
theory - Auto-generated module structure
- game_
theory_ ext - Auto-generated module structure
- geometric_
group_ theory - Auto-generated module structure
- geometric_
measure_ theory - Auto-generated module structure
- geometric_
topology - Geometric topology: 3-manifolds, knot surgery, JSJ decomposition, gluing matrices.
- graph
- Auto-generated module structure
- graph_
algorithms - Advanced graph algorithms module.
- groebner_
bases - Auto-generated module structure
- group_
theory - Auto-generated module structure
- harmonic_
analysis - Auto-generated module structure
- hashmap
- Auto-generated module structure
- hashset
- Auto-generated module structure
- higher_
category_ theory - Auto-generated module structure
- homological_
algebra - Auto-generated module structure
- homological_
computations - Auto-generated module structure
- homotopy_
theory - Auto-generated module structure
- homotopy_
type_ theory - Auto-generated module structure
- hybrid_
systems - Hybrid dynamical systems theory.
- information_
geometry - Auto-generated module structure
- information_
theoretic_ security - Auto-generated module structure
- information_
theory - Auto-generated module structure
- information_
theory_ ext - Auto-generated module structure
- int
- Auto-generated module structure
- intersection_
theory - Auto-generated module structure
- io
- Auto-generated module structure
- iwasawa_
theory - Auto-generated module structure
- k_
theory - Auto-generated module structure
- knot_
theory - Auto-generated module structure
- lambda_
calculus - Auto-generated module structure
- lattice_
theory - Auto-generated module structure
- lazy
- Auto-generated module structure
- lie_
theory - Auto-generated module structure
- linear_
algebra - Auto-generated module structure
- linear_
logic - Auto-generated module structure
- linear_
programming - Auto-generated module structure
- linear_
temporal_ logic - Linear Temporal Logic (LTL) — model checking over Kripke structures.
- list
- Auto-generated module structure
- logic
- Auto-generated module structure
- logic_
programming - Prolog-style logic programming engine: SLD resolution, unification, databases.
- low_
dimensional_ topology - Auto-generated module structure
- machine_
learning - Auto-generated module structure
- mathematical_
ecology - Auto-generated module structure
- mathematical_
physics - Auto-generated module structure
- measure_
theory - Auto-generated module structure
- mechanism_
design - Auto-generated module structure
- modal_
logic - Auto-generated module structure
- model_
checking - Auto-generated module structure
- model_
theory - Auto-generated module structure
- modular_
forms - Auto-generated module structure
- monad
- Auto-generated module structure
- motivic_
cohomology - Auto-generated module structure
- nat
- Auto-generated module structure
- network_
theory - Auto-generated module structure
- noncommutative_
geometry - Auto-generated module structure
- nonlinear_
dynamics - Nonlinear dynamics module.
- nonstandard_
analysis - Auto-generated module structure
- number_
theory - Auto-generated module structure
- numerical_
analysis - Auto-generated module structure
- numerical_
linear_ algebra - Auto-generated module structure
- observational_
type_ theory - Auto-generated module structure
- operations_
research - Auto-generated module structure
- operator_
algebras - Auto-generated module structure
- optimal_
transport - Optimal transport module.
- optimization_
theory - Auto-generated module structure
- option
- Auto-generated module structure
- ord
- Auto-generated module structure
- order
- Auto-generated module structure
- order_
topology - Auto-generated module structure
- ordering
- Auto-generated module structure
- padic_
analysis - Auto-generated module structure
- padic_
hodge_ theory - Auto-generated module structure
- parameterized_
complexity - Auto-generated module structure
- parametricity
- Auto-generated module structure
- parsec
- Auto-generated module structure
- pde_
theory - Auto-generated module structure
- persistent_
data_ structures - Persistent (immutable) data structures.
- point_
free_ topology - Auto-generated module structure
- point_
set_ topology - Auto-generated module structure
- post_
quantum_ crypto - Auto-generated module structure
- probabilistic_
programming - Auto-generated module structure
- probability
- Auto-generated module structure
- prod
- Auto-generated module structure
- program_
extraction - Program extraction from constructive proofs via the Curry-Howard correspondence.
- program_
logics - Auto-generated module structure
- program_
synthesis - Auto-generated module structure
- proof_
mining - Auto-generated module structure
- proof_
theory - Auto-generated module structure
- prop
- Auto-generated module structure
- quantum_
computing - Auto-generated module structure
- quantum_
error_ correction - Auto-generated module structure
- quantum_
field_ theory - Auto-generated module structure
- quantum_
information - Auto-generated module structure
- quotient_
types - Auto-generated module structure
- ramsey_
theory - Ramsey theory module.
- random_
matrix_ theory - Auto-generated module structure
- range
- Auto-generated module structure
- rbtree
- Auto-generated module structure
- real
- Auto-generated module structure
- registry
- Standard library module registry, dependency graph, feature flags, and metadata types.
- repr
- Auto-generated module structure
- representation_
theory - Auto-generated module structure
- result
- Auto-generated module structure
- reverse_
mathematics - Auto-generated module structure
- rough_
set_ theory - Auto-generated module structure
- session_
types - Auto-generated module structure
- set
- Auto-generated module structure
- set_
theory_ zfc - Auto-generated module structure
- sheaf_
theory - Auto-generated module structure
- show
- Auto-generated module structure
- sigma
- Auto-generated module structure
- social_
choice_ theory - Auto-generated module structure
- spectral_
graph_ theory - Spectral graph theory module.
- spectral_
methods - Auto-generated module structure
- spectral_
theory - Auto-generated module structure
- static_
analysis - Auto-generated module structure
- statistical_
learning - Auto-generated module structure
- statistical_
mechanics - Auto-generated module structure
- std_
utilities - Extended standard library utility types: Span, Located, NameTable, DiagnosticLevel, Diagnostic, DiagnosticBag, ScopeTable, Counter, FreshNameGen, StringSet, MultiMap, Trie, BitSet64, MinHeap, DirectedGraph.
- stochastic_
control - Auto-generated module structure
- stochastic_
processes - Auto-generated module structure
- stream
- Auto-generated module structure
- string
- Auto-generated module structure
- string_
theory_ basics - Auto-generated module structure
- sum
- Auto-generated module structure
- surreal_
numbers - Auto-generated module structure
- symplectic_
geometry - Auto-generated module structure
- systems_
biology - Auto-generated module structure
- tactic_
lemmas - Auto-generated module structure
- tauberian_
theory - Auto-generated module structure
- temporal_
logic - Auto-generated module structure
- term_
rewriting - Auto-generated module structure
- thunk
- Auto-generated module structure
- topological_
data_ analysis - Auto-generated module structure
- topological_
quantum_ computation - Auto-generated module structure
- topology
- Auto-generated module structure
- topology_
ext - Auto-generated module structure
- topos_
theory - Auto-generated module structure
- tropical_
geometry - Auto-generated module structure
- type_
directed_ search - Hoogle-like type-directed function search.
- type_
inference_ algorithms - Auto-generated module structure
- type_
theory - Auto-generated module structure
- type_
theory_ advanced - Auto-generated module structure
- universal_
algebra - Auto-generated module structure
- variational_
analysis - Auto-generated module structure
- variational_
calculus - Auto-generated module structure
- vec
- Auto-generated module structure
- wellfounded
- Auto-generated module structure
- zero_
knowledge_ proofs - Zero-knowledge proofs module.