--
You received this message because you are subscribed to the Google Groups "Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metamath+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/6f644425-c9fd-4516-b8f3-76b104c2be4fn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/b3b85824-1085-470e-848a-45e2b751f267n%40googlegroups.com.
I maybe wrong, but my feeling is that what Jagra calls A , in Mario's translation is actually < A , 4 > (or < A, F(A) > , if you prefer).
I wanted to check how far I can get in formalizing this problem and its solution. But I stuck in the very beginning.
Firstly, I formalized the initial conditions as Mario suggested:
hyp1: |- 0 < k
hyp2: |- 0 < l
hyp3: |- F = ( x e. RR |-> ( ( ( k x. ( x ^ 2 ) ) - ( ( 2 x. k ) x. x ) ) + l ) )
hyp4: |- { x | ( F ` x ) = 4 } = { a , b }
hyp5: |- ( ( ( a - b ) ^ 2 ) + ( ( ( F ` a ) - ( F ` b ) ) ^ 2 ) ) = ( 6 ^ 2 )
hyp6: |- ( ( ( a ^ 2 ) + ( ( F ` a ) ^ 2 ) ) + ( ( b ^ 2 ) + ( ( F ` b ) ^ 2 ) ) ) = c
I used { a , b } instead of { A , B } because then I can easily prove |- a e. _V, which is used in the proof below. Also, as I understand, a and b represent x-coordinates of the corresponding points.
Next, I wanted to simplify hyp5, by proving that F(a) = F(b) = 4, so the hyp5 would be |- ( ( a - b ) ^ 2 ) = ( 6 ^ 2 ). But that’s where I am stuck. I can prove |- [ a / x ] ( F ` x ) = 4 which looks a right direction to move in:
1| | vex | |- a e. _V
2| 1 | prid1 | |- a e. { a , b }
3| | hyp4 | |- { x | ( F ` x ) = 4 } = { a , b }
4| 3 | eleq2i | |- ( a e. { x | ( F ` x ) = 4 } <-> a e. { a , b } )
5| 2,4 | mpbir | |- a e. { x | ( F ` x ) = 4 }
6| | df-clab | |- ( a e. { x | ( F ` x ) = 4 } <-> [ a / x ] ( F ` x ) = 4 )
7| 5,6 | mpbi | |- [ a / x ] ( F ` x ) = 4
--
You received this message because you are subscribed to the Google Groups "Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metamath+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/161f583c-22bf-4699-b663-92652793f9c3n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/4c4161e9-ccfc-4289-a19d-1bdcb701bbfbn%40googlegroups.com.
Thank you Glauco and Mario for helpful answers. I will need some time to analyze and understand everything you wrote.
For now, I have one question. Glauco, you mentioned that you developed this proof using Yamma. Can you explain at a high level what steps you’ve done in Yamma to come up with such a proof? I am asking for the proof of |- ( F ` a ) = 4. No need to explain how to set up Yamma, it can be found in its readme. I am more interested in how much of this proof was constructed by Yamma and how much was manual work. I didn’t have time yet to try to prove this in Yamma, but I will surely try. So, what I think would be interesting for me (and probably for others) is a high level list of actions you’ve done to create this proof. For example:
1) put all required hypotheses and the goal statement to Yamma.
2) I know that for such kind of proofs elrab assertion is usually used, so type its name in and unify (press CTRL+U). New steps appeared.
3) …
I will be very surprised if you’ve just provided the hypotheses and the goal statement and Yamma found everything else!
Sorry, if I am requesting too much. You can respond as high level or detailed depending on how much free time you have. I am asking because I tried to prove this using mm-lamp. Since I don’t know set.mm assertions well, I just searched for assertions which I thought could be used in the proof and tried to combine them somehow. I am interested in how you came up with this proof (how much automation you used and how much your experience with set.mm).
BTW, it is Igor writing :)
-
Igor
Hi Glauco,
Yes, this answers my question. Thank you very much. Also I found this thread contains other shortcuts used in the video.
I don’t have much experience with mmj2. I used it to repeat proofs from David’s video tutorials, but not for creating my own proofs.
-
Igor
To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/0466031a-8f6f-4d1d-8a69-8ff2351dc4f6n%40googlegroups.com.
Hi Jorge,
I am not sure what you mean by saying that it is given as a hypothesis. So, I will explain as detailed as I can. It may seem obvious that F(a) = 4 from the original edition of the problem formulated in the “human language”. But it is not explicitly given in the collection of hypotheses I chose. The closest hypothesis in my collection is hyp4: |- { x | ( F ` x ) = 4 } = { A , B } (I switched back to class variables). However, Metamath doesn’t understand meaning of statements. It can only compare statements symbol by symbol. That’s why I have to prove |- ( F ` A ) = 4 before I can use it in my proof.
The same problem may be formalized in many ways, and you can choose another approach, which will explicitly include F(a) = 4 and maybe some obvious calculations done. For example:
|- 0 < k
|- 0 < l
|- F = ( x e. RR |-> ( ( ( k x. ( x ^ 2 ) ) - ( ( 2 x. k ) x. x ) ) + l ) )
|- ( F ` A ) = 4
|- ( F ` B ) = 4
|- ( abs ` ( A - B ) ) = 6
|- ( ( ( A ^ 2 ) + ( B ^ 2 ) ) + ; 3 2 ) = C
These hypotheses also should describe the same problem, but they explicitly include |- ( F ` A ) = 4 and you will not have to prove it. (actually these two collections of hypotheses may be not exactly equivalent, but I hope it is clear what I mean)
-
Igor
Thanks Glauco for showing this example. I didn’t expect that |- 0 < k implies |- 0 < -u 1 .
-
Igor
--
You received this message because you are subscribed to the Google Groups "Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metamath+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/3bf568bf-cae2-4853-9735-555598676ef5n%40googlegroups.com.
Thanks Mario. I also found useful explanations on setvar and class variables on the Metamath Proof Explorer Home Page. For example, setvar variables “often serve as bound or dummy variables in expressions, i.e. the first argument of the ∀ quantifier connective”.
So, taking all the above discussions into account I refactored my hypotheses:
hyp1 |- ( ph -> L e. RR )
hyp2 |- ( ph -> K e. RR )
hyp3 |- ( ph -> 0 < L )
hyp4 |- ( ph -> 0 < K )
hyp5 |- ( ph -> F = ( x e. RR |-> ( ( K x. ( x ^ 2 ) ) + ( ( -u ( 2 x. K ) x. x ) + L ) ) ) )
hyp6 |- ( ph -> A e. _V )
hyp7 |- ( ph -> B e. _V )
hyp8 |- ( ph -> { x e. RR | ( F ` x ) = 4 } = { A , B } )
hyp9 |- ( ph -> ( ( ( A - B ) ^ 2 ) + ( ( ( F ` A ) - ( F ` B ) ) ^ 2 ) ) = ( 6 ^ 2 ) )
Are they correct now? Don’t they introduce any contradiction?
What about A e. _V and B e. _V, is it really needed?
Can we use A e. CC and B e. CC instead of A e. _V and B e. _V? (that should simplify some proofs)
Also, I think that adding |- A e. RR and |- B e. RR as hypotheses is incorrect, because it may happen that roots of the quadratic equation are imaginary numbers and then we would have a contradiction: |- A e. RR (as a hypothesis) and |- A e. ( CC \ RR ). Am I right? Or the fact that hyp5 mentions "x e. RR" makes usage of |- A e. RR and |- B e. RR as hypotheses safe?
-
Igor
You are right, Glauco, it is possible to prove A=/=B
${
$d A x $.
$d B x $.
$d F x $.
AneB.1 $e |- ( ph -> X = { x e. RR | ( F ` x ) = 4 } ) $.
AneB.2 $e |- ( ph -> A e. X ) $.
AneB.3 $e |- ( ph -> B e. X ) $.
AneB.4 $e |- ( ph -> ( ( ( A - B ) ^ 2 ) + ( ( ( F ` A ) - ( F ` B ) ) ^ 2 ) ) = ( 6 ^ 2 ) ) $.
AneB $p |- ( ph -> A =/= B )
$= ( cr wcel cfv c4 wceq cv crab wa eleqtrd fveqeq2 elrab sylib simpld
recnd cmin co cc0 c2 cexp c6 caddc subcld sqcld addid1d sq0 oveq2i 4cn
subidi oveq1i simprd oveq2d oveq1d eqtr3d eqtr3id cn 6nn a1i nnsqcld
nnne0d eqnetrd sq0i adantl mteqand subne0ad )
ACDACACKZLZCEMZNZOZACBPZEMVROZBVOQZLVPVSRACFWBHGSW
AVSBCVOVTCVRETUAUBZUCUDZADADVOLZDEMZVROZADWBLWEWGR
ADFWBIGSWAWGBDVOVTDVRETUAUBZUCUDZACDUEZUFZUGZWKUHZ
UIZUFZWLAWOUJZWMWNUFZWLAWOWLUKZUFZWOWQAWOAWKACDWDW
IULUMUNAWSWOWLWMWNUFZWRUFZWQWTWLWOWRUOUPAXAWOVRVRW
JUFZWMWNUFZWRUFZWQXCWTWOWRXBWLWMWNVRUQURUSUPAWOVRW
FWJUFZWMWNUFZWRUFZXDWQAXFXCWOWRAXEXBWMWNAWFVRVRWJA
WEWGWHUTVAVBVAAWOVQWFWJUFZWMWNUFZWRUFXGWQAXIXFWOWR
AXHXEWMWNAVQVRWFWJAVPVSWCUTVBVBVAJVCVCVDVDVCAWQAWP
WPVELAVFVGVHVIVJWKWLOWOWLOAWKVKVLVMVN $.
$}
The complete proof table is attached.
Thank you for your response!
-
Igor
It was not easy, but I managed to create a proof for that task. The complete proof is attached (task1_v1.mm). It consists of three parts.
The first part includes generic theorems used in the proof. Some of them are copied from a mathbox and renamed to make the entire proof independent of mathboxes.
The second part includes different lemmas needed for the proof. It is actually the main part.
The third part repeats the second part. But I added it to make the idea of the proof easier to understand.
What I proved is:
C = ( ; 3 6 - ( 2 x. ( ( L - 4 ) / K ) ) )
( L - 4 ) < K
Here is the third part of the proof with some text formatting to highlight the main parts:
${
$d ph x $.
$d A x $.
$d B x $.
$d F x $.
$d K x $.
$d L x $.
task1.1 $e |- ( ph -> L e. RR+ ) $.
task1.2 $e |- ( ph -> K e. RR+ ) $.
task1.3 $e |- F = ( x e. RR |-> ( ( K x. ( x ^ 2 ) ) + ( ( -u ( 2 x. K ) x. x ) + L ) ) ) $.
task1.4 $e |- X = { x e. RR | ( F ` x ) = 4 } $.
task1.5 $e |- ( ph -> A e. X ) $.
task1.6 $e |- ( ph -> B e. X ) $.
task1.7 $e |- ( ph -> ( ( ( A - B ) ^ 2 ) + ( ( ( F ` A ) - ( F ` B ) ) ^ 2 ) ) = ( 6 ^ 2 ) ) $.
task1.8 $e |- ( ph -> ( ( ( A ^ 2 ) + ( ( F ` A ) ^ 2 ) ) + ( ( B ^ 2 ) + ( ( F ` B ) ^ 2 ) ) ) = C ) $.
$( It follows from task1.4, task1.5, and task1.6 that F(A) = F(B) = 4. $)
task1_step1
$p |- ( ph -> ( F ` A ) = 4 )
$= ( cv cfv c4 wceq cr crab a1i task1_lem1 ) ABCFIIBRFSTUABUBUCUAAMUDNUE $.
task1_step2
$p |- ( ph -> ( F ` B ) = 4 )
$= ( cv cfv c4 wceq cr crab a1i task1_lem1 ) ABDFIIBRFSTUABUBUCUAAMUDOUE $.
$( Knowing that F(A) = F(B) = 4, we can simplify the expression for C: $)
task1_step3
$p |- ( ph -> C = ( ( ( A ^ 2 ) + ( B ^ 2 ) ) + ; 3 2 ) )
$= ( cv cfv c4 wceq cr crab a1i task1_lem2 ) ABCDEFIIBRFSTUABUBUCUAAMUDNOQUE $.
$( Using the equality F(A) = 4 and applying the actual formula for F,
we can construct a quadratic equation:
$)
task1_step4
$p |- ( ph -> ( ( K x. ( A ^ 2 ) ) + ( ( -u ( 2 x. K ) x. A ) + ( L - 4 ) ) ) = 0 )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem3 )
ABCFGHIJKFBRZGBSZTZUAUBUCZUBUOGUPUBUDUNUPUBHUEZUBU QUBUFUGALUHIUNFUIUJUGBUMUKUGAMUHNUL $.
${
$( This quadratic equation has the discriminant: $)
task1.9 $e |- ( ph -> D = ( ( -u ( 2 x. K ) ^ 2 ) - ( 4 x. ( K x. ( L - 4 ) ) ) ) ) $.
$( By solving that quadratic equation, we obtain two possible values for A: $)
task1_step5
$p |- ( ph -> (
A = ( 1 + ( ( sqrt ` D ) / ( 2 x. K ) ) )
\/
A = ( 1 - ( ( sqrt ` D ) / ( 2 x. K ) ) )
) )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem4 )
ABCFGHIJKLGBTZHBUAZUBZUCUDUEZUDUQHURUDUFUPURUDIUGZ UDUSUDUHUIAMUJJUPGUKULUIBUOUMUIANUJOSUN $.
$( Analogously, we can construct a similar quadratic equation for B
and obtain two possible values:
$)
task1_step6
$p |- ( ph -> (
B = ( 1 + ( ( sqrt ` D ) / ( 2 x. K ) ) )
\/
B = ( 1 - ( ( sqrt ` D ) / ( 2 x. K ) ) )
) )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem4 )
ABDFGHIJKLGBTZHBUAZUBZUCUDUEZUDUQHURUDUFUPURUDIUGZ UDUSUDUHUIAMUJJUPGUKULUIBUOUMUIANUJPSUN $.
$( From the fact that A and B are a distance 6 apart (task1.7)
it follows that A and B cannot be equal.
$)
task1_step7
$p |- ( ph -> A =/= B )
$= ( cv cfv c4 wceq cr crab a1i task1_lem5 ) ABCDGJJBTGUAUBUCBUDUEUCANUFOPQUG $.
$( Since A and B must be different, we can have only two possible
pairs of values for A and B:
$)
task1_step8
$p |- ( ph -> (
(
A = ( 1 + ( ( sqrt ` D ) / ( 2 x. K ) ) )
/\
B = ( 1 - ( ( sqrt ` D ) / ( 2 x. K ) ) )
)
\/
(
A = ( 1 - ( ( sqrt ` D ) / ( 2 x. K ) ) )
/\
B = ( 1 + ( ( sqrt ` D ) / ( 2 x. K ) ) )
)
) )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem6 )
ABCDFGHIJKLGBTZHBUAZUBZUCUDUEZUDUQHURUDUFUPURUDIUG
ZUDUSUDUHUIAMUJJUPGUKULUIBUOUMUIANUJOPQSUN $.
$( Also, since both A and B are real numbers, the discriminant must be positive.
If the discriminant were 0, then A would be equal to B.
If the discriminant were negative, then A and B would be complex numbers.
$)
task1_step9
$p |- ( ph -> 0 < D )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem7 )
ABCDFGHIJKLGBTZHBUAZUBZUCUDUEZUDUQHURUDUFUPURUDIUG
ZUDUSUDUHUIAMUJJUPGUKULUIBUOUMUIANUJOPQSUN $.
$}
$( Knowing that 0 < D, we can simplify the expressions for A and B: $)
task1_step10
$p |- ( ph -> (
(
A = ( 1 + ( sqrt ` ( 1 - ( ( L - 4 ) / K ) ) ) )
/\
B = ( 1 - ( sqrt ` ( 1 - ( ( L - 4 ) / K ) ) ) )
)
\/
(
A = ( 1 - ( sqrt ` ( 1 - ( ( L - 4 ) / K ) ) ) )
/\
B = ( 1 + ( sqrt ` ( 1 - ( ( L - 4 ) / K ) ) ) )
)
) )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem10 )
ABCDFGHIJKFBRZGBSZTZUAUBUCZUBUOGUPUBUDUNUPUBHUEZUB UQUBUFUGALUHIUNFUIUJUGBUMUKUGAMUHNOPUL $.
$( Regardless of which pair of values we take for A and B,
we always get the same value for A^2+B^2:
$)
task1_step11
$p |- ( ph -> ( ( A ^ 2 ) + ( B ^ 2 ) ) = ( 4 - ( 2 x. ( ( L - 4 ) / K ) ) ) )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem15 )
ABCDFGHIJKFBRZGBSZTZUAUBUCZUBUOGUPUBUDUNUPUBHUEZUB UQUBUFUGALUHIUNFUIUJUGBUMUKUGAMUHNOPUL $.
$( Now we can simplify the expression for C from step3 $)
task1_step12
$p |- ( ph -> C = ( ; 3 6 - ( 2 x. ( ( L - 4 ) / K ) ) ) )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem16 )
ABCDEFGHIJKFBRZGBSZTZUAUBUCZUBUOGUPUBUDUNUPUBHUEZU BUQUBUFUGALUHIUNFUIUJUGBUMUKUGAMUHNOPQUL $.
$( Also, from 0 < D, it follows that K and L cannot be arbitrary positive numbers;
they must satisfy the relation:
$)
task1_step13
$p |- ( ph -> ( L - 4 ) < K )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem8 )
ABCDFGHIJKFBRZGBSZTZUAUBUCZUBUOGUPUBUDUNUPUBHUEZUB UQUBUFUGALUHIUNFUIUJUGBUMUKUGAMUHNOPUL $.
$}
-
Igor
It appears that my previous proof could be continued to get a simpler result. The complete proof is attached - task1_v2.mm.
The new result is as follows:
${
$d ph x $.
$d A x $.
$d B x $.
$d F x $.
$d K x $.
$d L x $.
task1_v2.1 $e |- ( ph -> L e. RR+ ) $.
task1_v2.2 $e |- ( ph -> K e. RR+ ) $.
task1_v2.3 $e |- ( ph -> F = ( x e. RR |-> ( ( K x. ( x ^ 2 ) ) + ( ( -u ( 2 x. K ) x. x ) + L ) ) ) ) $.
task1_v2.4 $e |- ( ph -> X = { x e. RR | ( F ` x ) = 4 } ) $.
task1_v2.5 $e |- ( ph -> A e. X ) $.
task1_v2.6 $e |- ( ph -> B e. X ) $.
task1_v2.7 $e |- ( ph -> ( ( ( A - B ) ^ 2 ) + ( ( ( F ` A ) - ( F ` B ) ) ^ 2 ) ) = ( 6 ^ 2 ) ) $.
task1_v2
$p |- ( ph -> ( ( ( A ^ 2 ) + ( ( F ` A ) ^ 2 ) ) + ( ( B ^ 2 ) + ( ( F ` B ) ^ 2 ) ) ) = ; 5 2 )
$= ( c2 cexp co cfv caddc eqidd task1_lem20 ) ABCDCPZQZRCESUCUDRTZRDUCUDRDESUCUDRUERUERZEFGHIJKL MNOAUFUAUB $.
$}
And here are the new steps with comments:
$( Also, from 0 < D, it follows that K and L cannot be arbitrary positive numbers;
they must satisfy the relation:
$)
task1_step13
$p |- ( ph -> ( L - 4 ) < K )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem8 )
ABCDFGHIJKFBRZGBSZTZUAUBUCZUBUOGUPUBUDUNUPUBHUEZUB UQUBUFUGALUHIUNFUIUJUGBUMUKUGAMUHNOPUL $.
$( Analogous to step11, regardless of the values we choose for A and B,
we always get the same result for (A-B)^2:
$)
task1_step13
$p |- ( ph -> ( ( A - B ) ^ 2 ) = ( 4 x. ( 1 - ( ( L - 4 ) / K ) ) ) )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem18 )
ABCDFGHIJKFBRZGBSZTZUAUBUCZUBUOGUPUBUDUNUPUBHUEZUB UQUBUFUGALUHIUNFUIUJUGBUMUKUGAMUHNOPUL $.
$( By substituting the above expression for (A-B)^2 into task1.7 and simplifying,
we get:
$)
task1_step14
$p |- ( ph -> ( ( L - 4 ) / K ) = -u 8 )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem19 )
ABCDFGHIJKFBRZGBSZTZUAUBUCZUBUOGUPUBUDUNUPUBHUEZUB UQUBUFUGALUHIUNFUIUJUGBUMUKUGAMUHNOPUL $.
$( Now we can simplify the expression for C from step12 $)
task1_step15
$p |- ( ph -> C = ; 5 2 )
$= ( cr cv c2 cexp co cmul cneg caddc cmpt wceq a1i cfv c4 crab task1_lem20 )
ABCDEFGHIJKFBRZGBSZTZUAUBUCZUBUOGUPUBUDUNUPUBHUEZU BUQUBUFUGALUHIUNFUIUJUGBUMUKUGAMUHNOPQUL $.
$}
-
Igor