Cookies disclaimer

I agree Our site saves small pieces of text information (cookies) on your device in order to deliver better content and for statistical purposes. You can disable the usage of cookies by changing the settings of your browser. By browsing our website without changing the browser settings you grant us permission to store that information on your device.

Special Pythagorean Triple

A Pythagorean Triple is a set of three natural numbers, a < b < c , for which a2 + b2 = c2

For example 32 + 42 = 9 + 16 = 25 = 52

There exists a Pythagorean triple for which a + b + c = 1000, can you find it?

(inspired by Project Euler)

Resources

Download Files

Definitions File

theory Defs
imports Main
begin

definition "pythagoreantriple a b c \<longleftrightarrow> a<b \<and> b<c \<and> a*a + b*b = c*c"

end

Template File

theory Submission
imports Defs
begin


lemma GOAL: "\<exists>a b c :: nat. pythagoreantriple a b c \<and> a + b + c = 1000" 
  sorry


end

Check File

theory Check
imports Submission
begin


lemma "\<exists>a b c :: nat. pythagoreantriple a b c \<and> a + b + c = 1000" 
  by(rule Submission.GOAL)


end
Download Files

Definitions File

theory Defs
imports Main
begin

(* Isabelle2019 *)

definition "pythagoreantriple a b c \<longleftrightarrow> a<b \<and> b<c \<and> a*a + b*b = c*c"

end

Template File

theory Submission
imports Defs
begin


lemma GOAL: "\<exists>a b c :: nat. pythagoreantriple a b c \<and> a + b + c = 1000" 
  sorry


end

Check File

theory Check
imports Submission
begin


lemma "\<exists>a b c :: nat. pythagoreantriple a b c \<and> a + b + c = 1000" 
  by(rule Submission.GOAL)


end
Download Files

Definitions File

Require Export NArith Lia.
Open Scope N.

Definition pythagorean_triple (a b c: N) :=
  a < b /\ b < c /\ a*a + b*b = c*c.

Template File

Require Import Defs.

Theorem goal : exists a b c, pythagorean_triple a b c /\ a + b + c = 1000.
Proof.
  (* todo *)
Admitted.

Terms and Conditions