Zulip Chat Archive

Stream: new members

Topic: why \| is unexpected


klh (Oct 30 2024 at 10:49):

image.png

Patrick Massot (Oct 30 2024 at 10:49):

You forgot to put a name.

klh (Oct 30 2024 at 10:53):

What is your meaning? What name?

Patrick Massot (Oct 30 2024 at 10:53):

A name for the assumption Lean is complaining about.

Patrick Massot (Oct 30 2024 at 10:54):

It would be a lot easier to help you if you post code instead of pictures (read #backticks for instructions).

Patrick Massot (Oct 30 2024 at 10:55):

I could have fixed your code, but I don’t want to type it because you posted an image.

klh (Oct 30 2024 at 10:56):

'''import mathlib

open Nat

variable(x y :ℕ+ ){n:ℕ+}

def a  : ℕ → ℕ

| 0 => 0

| 1 => 0

| n+2 => x * a (n + 1) + y * a n + 1

def a_n:=a n

def a_n₁:=a (n+1)

theorem  property (p q : ℕ) (hp : Nat.Prime p) (hq : Nat.Prime q) (hy: q∣y) :Nat.Coprime q (Nat.gcd a_p a_p₁) := by

sorry

theorem  property₁(p q : ℕ) (hp : Nat.Prime p) (hq : Nat.Prime q) (hy: Corprime q y)(q∣a_p∧ q∣a_p₁):q>√p:= by

sorry'''

Yaël Dillies (Oct 30 2024 at 10:56):

Please read #backticks to learn how to format code on Zulip :smile:

klh (Oct 30 2024 at 10:56):

Thank you very much

Yaël Dillies (Oct 30 2024 at 10:57):

theorem  property₁(p q : ) (hp : Nat.Prime p) (hq : Nat.Prime q) (hy: q.Coprime y)(hq' : qa_p qa_p₁):q>√p:= by
sorry

should work

klh (Oct 30 2024 at 10:58):

oh!I know.I made a stupid mistake . :clown:

Notification Bot (Oct 30 2024 at 17:34):

This topic was moved here from #lean4 > why \| is unexpected by Kyle Miller.


Last updated: May 02 2025 at 03:31 UTC