Logic Code:  22.602    :  6
View general information   Description   The subject within the syllabus as a whole   Professional fields to which it applies   Prior knowledge   Information prior to enrolment   Learning objectives and results   Content   View the UOC learning resources used in the subject   Additional information on support tools and learning resources   Guidelines on assessment at the UOC   View the assessment model  
This is the course plan for the second semester of the academic year 2022/2023. To check whether the course is being run this semester, go to the Virtual Campus section More UOC / The University / Programmes of study section on Campus. Once teaching starts, you'll be able to find it in the classroom. The course plan may be subject to change.

Logic permeates the entire scientific world and contributes, directly or indirectly, with the rigor that characterizes it. It is a basic knowledge for all scientific disciplines, and especially for computer science, both in its theoretical aspect and in the most practical and applied aspect.

The logical foundations that this subject provides are projected towards other subjects of the computer science degrees. Given this fundamental nature, logic is located at the initial levels of these degrees, close to other fundamental subjects such as algebra and calculus, and also close to subjects in the areas of programming or computer architecture.


The Logic subject is related to the other subjects of a mathematical nature and provides students with the logical-mathematical foundations that will facilitate the study of subsequent subjects in different areas of knowledge.

It is fundamental for the entire area of programming languages because of its importance in providing algorithms with a good logical structure, and because of its relevance in the verification and formal derivation of algorithms.

It is also essential for the study of database subjects that follow the relational model as a data model, since the standard language is based on predicate logic, SQL, for its manipulation.

Finally, it provides the necessary knowledge for the study of subjects in the area of computer technology, since the correct operation of hardware requires a good logical design.


The Logic subject enhances skills that are useful and important when interpreting and analyzing problems, as a preliminary step to solving them mechanically. One of the objectives is to learn to formalize using logical language. In the professional activity of computer science, the task of proposing mechanized solutions to problems that are often poorly or poorly specified is common. The skills and aptitudes necessary to formalize and to validate or refute reasoning are, fundamentally, the same ones that allow detecting the problems of a poorly or not at all correct specification.

Day by day artificial intelligence and its methods gain importance in many professional fields related to computer science. In that case, logic would be an excellent introductory tool.


It does not require any specific prior knowledge, except those that are essential for access to technical degrees at the University.


It does not require having previously taken other subjects of the degree.


General objective:

  • To know the fundamentals of the logic of statements and predicates and know how to apply their basic methodologies.


  • Specific competence of the degree:
    • Ability to understand and use the scientific bases of software development to analyze each problem at the appropriate level of abstraction for each situation and to apply the acquired skills and knowledge to address and solve it.
  • Competences of the course:
    • To learn to formalize natural language expressions using predicate logic.
    • To acquire skills to validate reasonings in predicate logic using the natural deduction method.
    • To acquire skills to validate reasonings in predicate logic using the resolution method.
    • To understand semantics of logic and know how to apply it in the validation of reasonings.


The content of the course is divided into two didactic modules that have a remarkable interrelation between them.

Module 1: Logic of statement

  • Logic of statements and its language
  • Natural deduction
  • Truth and falsehood: alternative and complement of natural deduction
  • The algebra of statements
  • Resolution

Module 2: Predicate Logic

  • Predicate logic and its language
  • The natural deduction
  • Truth and falsehood in predicate logic
  • Normal forms
  • Resolution

As it can be seen in this table of contents, the topics of the first module are repeated in the second. The variation consists of the formalism used (more complex in the second part than in the first one).

In addition, there are two more modules that are not evaluable and that remain as annex and extension material. 

Module 3: Logic and Boolean Algebra

Module 4: Set Theory


Logic and Boolean algebra PDF
Predicate logic PDF
Basic set theory PDF
Logic of statements PDF
Logic: Weekly Study Guide PDF
Formalization in the propositional logic(1). Parenthetization and hierarchy of symbols in propositional logic Audiovisual
Natural deduction in the predicate logic. How to advance in a natural deduction in predicate logic? Audiovisual
Formalization in the predicate logic. Keys to the formalization with quantifiers in the predicate logic Audiovisual
Natural deduction in the propositional logic. Strategic approach to proves by natural deduction Audiovisual
Formalization in the propositional logic(2). Sufficient and necessary conditions in propositional logic Audiovisual


Textual modules.

Four textual modules published by the UOC. All the concepts that are exposed in the learning modules are illustrated with examples. In addition, each module contains a number of self-assessment exercises, all of them solved.


Educational software.

The UOC has developed educational software that facilitates and supports the learning of the most important topics of the course. It allows solving different exercises, guiding and informing about the correctness or not of the solutions. It is a tool that that is also used in self-assessment and continuous assessment.


The assessment process is based on the student's personal work and presupposes authenticity of authorship and originality of the exercises completed.

Lack of authenticity of authorship or originality of assessment tests, copying or plagiarism, the fraudulent attempt to obtain a better academic result, collusion to copy or concealing or abetting copying, use of unauthorized material or devices during assessment, inter alia, are offences that may lead to serious academic or other sanctions.

Firstly, you will fail the course (D/0) if you commit any of these offences when completing activities defined as assessable in the course plan, including the final tests. Offences considered to be misconduct include, among others, the use of unauthorized material or devices during the tests, such as social media or internet search engines, or the copying of text from external sources (internet, class notes, books, articles, other students' essays or tests, etc.) without including the corresponding reference.

And secondly, the UOC's academic regulations state that any misconduct during assessment, in addition to leading to the student failing the course, may also lead to disciplinary procedures and sanctions.

The UOC reserves the right to request that students identify themselves and/or provide evidence of the authorship of their work, throughout the assessment process, and by the means the UOC specifies (synchronous or asynchronous). For this purpose, the UOC may require students to use a microphone, webcam or other devices during the assessment process, and to make sure that they are working correctly.

The checking of students' knowledge to verify authorship of their work will under no circumstances constitute a second assessment.


This course can be passed by two means: on one hand, with the continuous assessment (CA) and a synthesis test (ST), and, on the other hand, by taking a final exam (EX).
- To take the ST, you must have passed the CA.
- To take the EX, you do not need to have passed the CA.
- If you have passed the CA, there is the option of taking the EX instead of the ST.
The formula for accrediting the course is as follows: CA+ST or EX.