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.

# Kleiner Gauß

Little Carl Friedrich told Isabelle about a neat formula, she wonders whether it is correct.
Can you help?

## Resources

### Definitions File

```theory Defs
imports Main
begin

fun sumupto :: "nat \<Rightarrow> nat" where
"sumupto 0 = 0"
| "sumupto (Suc n) = (Suc n) + sumupto n"

end```

### Template File

```theory Submission
imports Defs
begin

lemma kleiner_gauss: "sumupto n = n * (n+1) div 2"
sorry

end```

### Check File

```theory Check
imports Submission
begin

lemma "sumupto n = n * (n+1) div 2"
by (rule Submission.kleiner_gauss)

end```

### Definitions File

```theory Defs
imports Main
begin

fun sumupto :: "nat \<Rightarrow> nat" where
"sumupto 0 = 0"
| "sumupto (Suc n) = (Suc n) + sumupto n"

end```

### Template File

```theory Submission
imports Defs
begin

lemma kleiner_gauss: "sumupto n = n * (n+1) div 2"
sorry

end```

### Check File

```theory Check
imports Submission
begin

lemma "sumupto n = n * (n+1) div 2"
by (rule Submission.kleiner_gauss)

end```

Terms and Conditions