Zulip Chat Archive
Stream: Lean for Scientists and Engineers 2024
Topic: Differences in setup of conclusion, AI vs human
Eric Taucher (Jul 13 2024 at 15:23):
For this given example
/- A toy mouse changes speed from a constant 2 m/s to 0 m/s in the span of two seconds.
It's mass is estimated to be around 0.1 kg.
The toy can only handle two Newtons of force.
Prove that the force it experiences is below this limit. -/
theorem toy_mouse_force_limit {f :ℝ }
(h1:v₀=2)
(h2:v₁=0)
(h3:m=0.1)
(h4:t=2)
(h5:a=(v₁ - v₀) / t)
(h6:f= m *a) :f < 2 := by
calc
f=m * a := by sorry
_=m*((v₁ - v₀) / t ):= by sorry
_= 0.1*((0 - 2) / 2 ) := by sorry
_ < 2 :=by sorry
used ChatGPT 4o to create Lean code based on world problem with following prompt.
Prompt (ChatGPT 4o)
Given the following word problem, create the Lean 4 prover code as a student exercise to be solved using single chain of expressions.
Use Lean example instead of theorem or lemma.
Include variable after keyword example in a format like example { x y : R}.
Use hypothesis in a format like (h1 : 10 = (a - b) ).
Put example, hypothesizes and conclusion on separate lines.
Use Lean sorry instead of providing solution.
Use words for variable name with underscores.
Convert each statement to one hypothesis if possible.
A toy mouse changes speed from a constant 2 m/s to 0 m/s in the span of two seconds.
It's mass is estimated to be around 0.1 kg.
The toy can only handle two Newtons of force.
Prove that the force it experiences is below this limit.
Reply
Here's the Lean 4 prover code for the given word problem:
example {speed_initial speed_final time_span mass max_force : ℝ}
(h1 : speed_initial = 2)
(h2 : speed_final = 0)
(h3 : time_span = 2)
(h4 : mass = 0.1)
(h5 : max_force = 2)
: ∃ (force : ℝ), force < max_force :=
sorry
This sets up the problem with the given hypotheses and leaves the proof as an exercise to be solved.
Being a programmer and not a mathematician don't really know what to think of the differences, thus looking for insight. Thanks
Last updated: May 02 2025 at 03:31 UTC