You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lean4game/server/testgame/TestGame/ToBePorted.lean

17 lines
424 B
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import Mathlib
-- TODO: `even`/`odd` sind in Algebra.Parity. Not ported yet
def even (a : ) : Prop := ∃ r, a = 2 * r
def odd (a : ) : Prop := ∃ k, a = 2 * k + 1
lemma not_odd {n : } : ¬ odd n ↔ even n := by sorry
lemma not_even {n : } : ¬ even n ↔ odd n := by sorry
lemma even_square (n : ) : even n → even (n ^ 2) := by
intro ⟨x, hx⟩
unfold even at *
use 2 * x ^ 2
rw [hx]
ring