ai with python logic programming in this we will focus logic programming and how it helps in artificial intelligence we already know that logic is the study of principles of correct reasoning or in simple words it is the study of what comes after what for exampleif two statements are true then we can infer any third statement from it concept logic programming is the combination of two wordslogic and programming logic programming is programming paradigm in which the problems are expressed as facts and rules by program statements but within system of formal logic just like other programming paradigms like object orientedfunctionaldeclarativeand proceduraletc it is also particular way to approach programming how to solve problems with logic programming logic programming uses facts and rules for solving the problem that is why they are called the building blocks of logic programming goal needs to be specified for every program in logic programming to understand how problem can be solved in logic programmingwe need to know about the building blocks facts and rulesfacts actuallyevery logic program needs facts to work with so that it can achieve the given goal facts basically are true statements about the program and data for exampledelhi is the capital of india rules actuallyrules are the constraints which allow us to make conclusions about the problem domain rules basically written as logical clauses to express various facts for exampleif we are building any game then all the rules must be defined rules are very important to solve any problem in logic programming rules are basically logical conclusion which can express the facts following is the syntax of rulea bn herea is the head and bn is the body for exampleancestor( , :father( ,yancestor( , :father( , )ancestor( ,zthis can be read asfor every and yif is the father of and is an ancestor of zx is the ancestor of for every and yx is the ancestor of zif is the father of and is an ancestor of