pub struct Lean4Backend { /* private fields */ }Expand description
Lean 4 code generation backend.
Implementations§
Source§impl Lean4Backend
impl Lean4Backend
Sourcepub fn with_std_imports() -> Self
pub fn with_std_imports() -> Self
Create a backend with standard Lean 4 imports.
Sourcepub fn compile_kernel_decl(
&mut self,
name: &str,
args: Vec<(String, Lean4Type)>,
ret_ty: Lean4Type,
body: Lean4Expr,
)
pub fn compile_kernel_decl( &mut self, name: &str, args: Vec<(String, Lean4Type)>, ret_ty: Lean4Type, body: Lean4Expr, )
Compile a simple kernel declaration (name + type + body) to a Lean 4 def.
Sourcepub fn add_theorem(
&mut self,
name: &str,
args: Vec<(String, Lean4Type)>,
ty: Lean4Type,
tactics: Vec<String>,
)
pub fn add_theorem( &mut self, name: &str, args: Vec<(String, Lean4Type)>, ty: Lean4Type, tactics: Vec<String>, )
Add a theorem with a tactic proof.
Sourcepub fn add_inductive(&mut self, ind: Lean4Inductive)
pub fn add_inductive(&mut self, ind: Lean4Inductive)
Add an inductive type.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lean4Backend
impl RefUnwindSafe for Lean4Backend
impl Send for Lean4Backend
impl Sync for Lean4Backend
impl Unpin for Lean4Backend
impl UnsafeUnpin for Lean4Backend
impl UnwindSafe for Lean4Backend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more