MCPcopy Create free account
hub / github.com/argumentcomputer/ix / add_eq_axioms

Function add_eq_axioms

crates/kernel/src/testing.rs:201–215  ·  view source on GitHub ↗

Add Eq.{u} and Eq.refl.{u} as axioms to the environment. Eq : {α : Sort u} → α → α → Prop Eq.refl : {α : Sort u} → (a : α) → Eq a a

(env: &mut KEnv<Meta>)

Source from the content-addressed store, hash-verified

199/// Eq : {α : Sort u} → α → α → Prop
200/// Eq.refl : {α : Sort u} → (a : α) → Eq a a
201pub fn add_eq_axioms(env: &mut KEnv<Meta>) {
202 let eq_ty =
203 ipi("α", sort(param(0)), npi("a", var(0), npi("b", var(1), sort0())));
204 let (eq_id, eq_c) = mk_axiom("Eq", 1, vec![mk_name("u")], eq_ty);
205 env.insert(eq_id, eq_c);
206
207 let eq_refl_ty = ipi(
208 "α",
209 sort(param(0)),
210 npi("a", var(0), apps(cnst("Eq", &[param(0)]), &[var(1), var(0), var(0)])),
211 );
212 let (refl_id, refl_c) =
213 mk_axiom("Eq.refl", 1, vec![mk_name("u")], eq_refl_ty);
214 env.insert(refl_id, refl_c);
215}
216
217/// Convenience: Eq.{u} α a b
218pub fn eq_expr(u: MU, alpha: ME, a: ME, b: ME) -> ME {

Callers 14

peano_envFunction · 0.85
bool_envFunction · 0.85
nat_envFunction · 0.85
prod_envFunction · 0.85
good_proof_irrelevanceFunction · 0.85
good_fun_etaFunction · 0.85
bad_fun_etaFunction · 0.85
good_fun_eta_depFunction · 0.85
good_trivial_eqFunction · 0.85
bad_non_prop_eqFunction · 0.85
unit_envFunction · 0.85
acc_envFunction · 0.85

Calls 10

ipiFunction · 0.85
sortFunction · 0.85
npiFunction · 0.85
mk_axiomFunction · 0.85
appsFunction · 0.85
paramFunction · 0.70
varFunction · 0.70
sort0Function · 0.70
cnstFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected