Skip to content

Commit

Permalink
Prime definition
Browse files Browse the repository at this point in the history
  • Loading branch information
archiebrowne committed Nov 1, 2023
1 parent 5567a47 commit 150e359
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Game/Levels/Division/Level_6.lean
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,10 @@ Statement dvd_add_right

sorry


example (a b c d : ℕ) (h : a * c + b = a * d) : a ∣ b := by
sorry


-- obtain ⟨n, rfl⟩ := Nat.le.dest (Nat. le_of_mul_le_mul_left (Nat. le.intro hm) this) use n
-- rw [Nat. mul_add] at hm exact Nat. add_left_cancel hm
14 changes: 14 additions & 0 deletions Game/Levels/Prime.lean
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
import GameServer.Commands
import Game.Levels.Prime.Level_1



World "Prime"
Title "Prime World"

Introduction
"
In this world, we provide the definition of a prime, and use it to
prove that 2 is pirme.
Click on \"Start\" to proceed.
"
9 changes: 9 additions & 0 deletions Game/Levels/Prime/Level_1.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Game.Levels.Multiplication
import Game.MyNat.Division
import Game.MyNat.Prime

World "Prime"
Level 1
Title "two_prime"


12 changes: 12 additions & 0 deletions Game/MyNat/Prime.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Mathlib.Init.Core
import Game.MyNat.Definition
import Game.MyNat.Division
import Game.MyNat.LE

namespace MyNat

def Prime (n : ℕ) := (2 ≤ n) ∧ ∀ (a b : ℕ), n ∣ a * b → n ∣ a ∨ n ∣ b



end MyNat

0 comments on commit 150e359

Please sign in to comment.