1
Fork 0

Document lean experiments

This commit is contained in:
Matei Adriel 2023-10-29 00:07:15 +02:00
parent ca3f83d186
commit 0d1e3638fe
9 changed files with 16 additions and 5 deletions

View file

@ -1,6 +1,6 @@
# Idris learning
This directory contains my experiments when first learning idris.
This directory contains the results of my first adventure into the world of Idris 2.
## File structure

View file

@ -1 +0,0 @@
def hello := "world"

View file

@ -0,0 +1 @@
def hello := "world"

View file

@ -1,4 +1,4 @@
import LeanSandbox.Nat
import Learning.Nat
macro "nat_ring_all" : tactic => `(simp_all [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.add_assoc, Nat.add_left_comm, Nat.add_comm, Nat.left_distrib, Nat.right_distrib])
macro "nat_ring" : tactic => `(simp [Nat.mul_assoc, Nat.mul_comm, Nat.mul_left_comm, Nat.add_assoc, Nat.add_left_comm, Nat.add_comm, Nat.left_distrib, Nat.right_distrib])

View file

@ -1,4 +1,4 @@
import LeanSandbox
import Learning
def main : IO Unit :=
IO.println s!"Hello, {hello}!"

11
lean/learning/README.md Normal file
View file

@ -0,0 +1,11 @@
# Lean learning
This directory contains the results of my first adventure into the world of Lean 4.
## File structure
| File | Description |
| ---------------------------------------------------- | ------------------------------------------------------- |
| [./Learning/Noob.lean](./Learning/Noob.lean) | Syntax practice |
| [./Learning/Nat.lean](./Learning/Nat.lean) | Natural numbers |
| [./Learning/Integers.lean](./Learning/Integers.lean) | Integers as quotient types over differences of naturals |

View file

@ -1,6 +1,6 @@
import Lake
open Lake DSL
package «lean-sandbox» {
package «lean-learning» {
-- add configuration options here
}