# Any real examples of formal logic necessary for solving scientific problems?

Discussion in 'Physics & Math' started by Speakpigeon, May 8, 2018.

1. ### iceauraValued Senior Member

Messages:
26,880
? What does that even mean?
Some kind of software?
To repeat, for the fourth or fifth time: greater complexity means less advantage for formal logic compared with intuition. People's intuition still works at complexity levels they cannot begin to handle via formal logic. Compared with intuition, formal logic is harder, not easier, to employ in complex situations.
Meanwhile:
Solutions to problems are not logically proved, in science. That's not what the logic is for, any of it.
All the "proofs" (checks on the validity of argument) involve formal logic, at all levels of complexity. Very complex matters must be broken into simpler pieces or aspects for that reason - since formal logic becomes confoundingly difficult in even slightly complex situations. Imagine debugging a new statistics package or writing program perfectly.
A couple lines before that you were interested in "the proof of potential solutions once you have them".
That doesn't make sense.
Concepts, new or otherwise, are not logically proved; formal logic is always used to verify validity of argument, and never used to "prove" results or "solutions". You seem to be thinking of math.

If you never acknowledge how formal logic is used in scientific inquiry, what the role of formal logic is in science, you will naturally come to the conclusion that it is not necessary.

3. ### gmilamValued Senior Member

Messages:
2,984
Thanks. I've been wondering what was meant by "formal logic".

As a programmer I use "logic" all the time, but if my assumptions are wrong, my results are likely to be wrong even if the underlying logic is impeccable.

While logic is a useful tool, I would think that science hinges on experiment and observation. So, while one's logic may be airtight - if it doesn't conform to mother nature, then it is irrelevant. Odds are that you have made an invalid assumption.

5. ### SpeakpigeonRegistered Senior Member

Messages:
318
As I see it, given a complex problem, a proof has to deal with the whole thing to be at all a formal proof of it. So, I take what you're saying to mean that formal logic just doesn't apply as soon as the problem becomes a bit complex.
EB

7. ### iceauraValued Senior Member

Messages:
26,880
In science, reducing complex problems to a series of smaller matters that research can handle is standard operating procedure. Doing it appropriately, so that the research provides meaningful information and one's interpretation of it improves one's understanding, is the skill and the art of the endeavor.
Why are you talking about "proofs", anyway?
Isolating the assumptions that must be checked in the case of failed scientific or technological efforts may be the primary use and greatest value of formal logic in all of human civilization. Although its employment in computer software is of large scale and wide significance as well.

8. ### arfa branecall me arfValued Senior Member

Messages:
5,711
Last night I watched that movie about Alan Turing. It's of course an adaptation, I imagine much of the reality was kind of boring, except that Turing designed and built a special purpose machine to crack the Nazi Enigma code.

So how much formal logic did he use to achieve that? The machine he built didn't work right off the bat, it took some time to get results.
Moreover, how complex was the problem he solved? How was it complicated (and by what)?

9. ### arfa branecall me arfValued Senior Member

Messages:
5,711
--https://ncatlab.org/nlab/show/quantum logic

10. ### iceauraValued Senior Member

Messages:
26,880
The entire machine and every aspect of it was an endeavor to mechanize formal logical deduction. It was successful.
Where the "he" was a reference to this:

11. ### iceauraValued Senior Member

Messages:
26,880
Again, this seems to be a question of notation. Rigour and formality would be the same thing, in the relevant aspects other than notation., no?

12. ### arfa branecall me arfValued Senior Member

Messages:
5,711
I think formal logic is the stuff you study at university, first and higher order logic, predicates, what a Boolean lattice is and so on.

Certainly what you'll be doing if you're a programmer doing proof of correctness on some critical software, is identifying loops and checking for loop invariants, and you can see it's a bit like finding an invariant in a physical theory, in that it can take a while to do it (from experience). You have to be a bit of an Alan Turing.

The idea is to rewrite a program as a set of loops with sequential chunks between them. You formally encode each loop as a statement in Hoare logic, in a metalanguage (a derivative of Java), and show that the loop is correctly coded, or if there's a logical contradiction then the code is a dud. You have to correct the code. So code-checking with a language which is itself an encoding of Hoare logic (a formal logic), is the killer app of debugging a program.

So although it seems that finding a loop invariant is harder than finding invariants in those parts of the code that are loop-free (even where there are branches like if-then), is that because of complexity? There's an algorithmic way to determine a loop invariant, sometimes several pages of equations, using a formal logic. So this algorithmic solution should be amenable to machine learning, you'd think.

Last edited: May 23, 2018
13. ### arfa branecall me arfValued Senior Member

Messages:
5,711
Formal notation: (a|P|b) . . . means roughly, if a is true and P happens, then c is true. The extended version says if all conditions in a are true and P happens then all conditions in b are true (i.e. a and b are sets of conditions). It's a kind of boundary, a logical boundary, for P. "P happens" means a section of code runs on a computer, and the computer doesn't halt with an error, called a runtime error.

Why does being able to encode any "code-section" P of a program (written presumably in any language), as an object in a more abstract language mean you can prove that P is correctly written? Since it's possible, then computers and formal logic must be hard to separate.

Did I win yet?

14. ### SpeakpigeonRegistered Senior Member

Messages:
318
Sure, but that's irrelevant to the OP.

What would be the use of doing any logic at all if you didn't go all the way down to doing the proof?

How could using formal logic without doing the proof help the OP's "necessary for solving a scientific problem"?

A proof is just a logical formula that is true and that you can check step by step all the way through from start to finish, basic obvious step by basic obvious step. The formula (p ⋁ not p) is the proof of any problem you can express with it.
EB

15. ### Confused2Registered Senior Member

Messages:
499
Hi EB,
Can anything in physics be said to be 'true' beyond the confines of the selected model and/or the limits of knowledge at the time the claim 'true' is made?
Having chosen a model and declared all aspects of the model to be 'true' and fit for purpose can you explain the difference between a non-obvious conclusion reached by (any) logic and a 'proof'?
C2

16. ### exchemistValued Senior Member

Messages:
7,334
I agree it seems evident proof cannot apply to scientific theories (models) themselves - this is basic philosophy of science.

But the way I understand the enquiry, it is more to do with whether there is a role for formal logic in the same way as there is for mathematics, to arrive at conclusions based on the starting premises assumed by the model in question. I am struggling to think of any examples, but I may not be the best person to make a judgement.

17. ### SpeakpigeonRegistered Senior Member

Messages:
318
Proofs don't establish that a theory is true. They establish that the theory is logically consistent with the set of hypotheses, i.e. the assumptions you start with, usually essentially concepts standing for real things (c is the speed of light), relations between these concepts (E = mcc), and observations interpreted as giving some specific values to these concepts (c = 300000 km/s).

So, truth here has a special meaning that's somewhat different from ordinary truth but it's nonetheless closely related to it. Basically, your logically consistent theory will give you the conclusions from more stringent hypotheses, in other word, what is true of the world when you apply the theory to particular cases. This should allow you to predict future events, for example.

People use logic not to prove that a theory is true of the real world, but to show that it is consistent with all the observations you have so far. In this sense, logic can indeed prove a theory is true of all observations done so far, and therefore that it's true of the world as we know it at this point.

Then it's up to you to decide whether to trust the conclusion so obtained. Usually we do, presumably on the basis of some form of "inductive" logic.

A proof is, or should be because I don't know what people really do, so it should be a logical formula, and one that they can tell is obviously true, at least according to some formal standard of logic. The conclusion of a proof has to be essentially the theory people want to prove. And, presumably, people will be motivated to make a literal and explicit logical proof precisely because the theory considered, i.e. the potential conclusion of the proof, to be not sufficiently obvious to them. But that should be a matter of personal judgement and of consensus among specialists.

In any case, to finish answering your question, you will try to make a proof whenever your theory doesn't seem obviously true to you.

If have a theory I'm sure is true: p or not p. Not terribly useful and I don't need to write of proof of it to know it's true but it's a perfectly meaningful theory about reality and it's true or it. Not bad! And I'm not even a scientist!
EB

18. ### parmaleeperipatetic artisanValued Senior Member

Messages:
2,379
I'm gonna be characteristically lazy here and suggest a possible 'fer instance--and hope that maybe someone else will fill in the blanks: I'm thinking something along the lines of Humberto Maturana's and Francesco Varela's concept of autopoiesis <<<. Not sure how absolutely essential formal logic would be, but it certainly derives from work in logic--specifically, again, Laws of Form. Isn't formal logic kinda intrinsic to all work in cybernetics, and cybernetics of cybernetics?

19. ### SpeakpigeonRegistered Senior Member

Messages:
318
Take whatever angle tickles your fancy but I'm interested in real examples of the formal logic necessary for solving scientific problems, if at all possible.
EB

20. ### originIn a democracy you deserve the leaders you elect.Valued Senior Member

Messages:
10,450
I don't think you have repeated this enough times. Perhaps you could do a little research on your own without asking us to do it for you. I mean you're the one that is interested, right?

21. ### parmaleeperipatetic artisanValued Senior Member

Messages:
2,379
Hmmm...

Consider what gmilam said:
in response to origin's excerpt from Encycopedia Brittanica
Not unlike the knowing-that and knowing-how distinction--or Wittgenstein's saying and showing (according to more contemporary, less stupid readings, i.e., Diamond, Cavell, et al). Science is procedural, experimental, etc. I'm not sure that "necessary" is all that meaningful here--or rather, one person might provide an example as to why formal logic is "necessary," and another may respond with, "yeah, but...".

22. ### SpeakpigeonRegistered Senior Member

Messages:
318
I don't think your analysis would stand to scrutiny but whatever the case may be I'm not here to insist formal logic is necessary to science. I'm here to ask anybody who would have an actual example of it's necessary use. If none, too bad.

Of course, to see that your analysis is flawed you just need to make a parallel with mathematics. Go on, use your same argument here and explain to me how mathematics is not necessary to modern science.
EB

23. ### arfa branecall me arfValued Senior Member

Messages:
5,711
You appear to be saying no responses in this thread so far satisfy your "actual example" criterion.

So you're saying Turing wasn't a scientist? The complex problem he solved--cracking an encryption code--wasn't science, why, because it was military science?

As to being necessary: I posted a link to ncatlab about a formal quantum logic, there is one or two. Is it necessary? What does it tell us that the lattice is nondistributive, though orthocomplemented? That is, any quantum experiment can have this nondistributive lattice defined on it, but who cares?

Last edited: May 23, 2018